Describe the bug
We use master/slave with sentinels architecture. We use the slaves to compute metrics about our usage of redis streams without hurting the performance of the master node.
We upgraded recently to Redis version 7, and we tried to use the lag field returned by the XINFO GROUPS command (https://redis.io/docs/latest/commands/xinfo-groups/) to compute our metrics, but its value seems incorrect on the slave. We can have of value of 0 on our master but have a value of more than 8000 on our slave.
Expected behavior
We expected lag field to be the same on both master and slave
Additional information
Redis Version : 7.2.5
Comment From: Hackatosh
Is it related to https://github.com/redis/redis/commit/f17381a38d78f75e228d00972115b31d9a1d0b2e ? 🤔
Comment From: sundb
@Hackatosh likely, but it's not possible to determine from the info you gave, can you try 7.4rc1 in your development enviroment to verify it? thanks.
Comment From: Hackatosh
I did not have the time to roll the release candidate on our development environment.
But we have observed something interesting on our progression : - When a node is a slave, the lag never stop growing. This impacts all consumer groups. - If we have a failover and this node becomes the new master, the lag stop to grow and stay frozen on the value it had before the node became the master
I do think https://github.com/redis/redis/commit/f17381a38d78f75e228d00972115b31d9a1d0b2e is the fix we need. Is there any way to backport the fix in https://github.com/redis/redis/commit/f17381a38d78f75e228d00972115b31d9a1d0b2e to Redis 7.2 and to not wait for the current release candidate to become stable ? That would help us a lot 🙏 I can open a PR if needed
Comment From: sundb
@Hackatosh yes, #12898 is worth backport. ping @oranagra
Comment From: oranagra
i agree. marked it for backport in the next 7.2 release.
Comment From: dpkrane
Hi! When can we expect a fix this bug in 7.2.x branch?