Message entry id still shows up in xpending after xtrim
write to a stream create a consumer group xreadgroup some messages but don't ack them xtrim the stream xpending returns all the entry ids including those have been trimmed
In this case, how to clean up the data?
Comment From: mrtwenty
you can
XACK id
or
XGROUP DESTROY test_mq test_group XGROUP CREATE test_mq test_group 0
Comment From: chendali16
test_group
When "XGROUP DESTROY test_mq test_group" is executed, the pending data in the test_ group will be cleared?
Comment From: hwware
test_group
When "XGROUP DESTROY test_mq test_group" is executed, the pending data in the test_ group will be cleared?
yes. Please see the following test steps:
Comment From: chendali16
test_group
When "XGROUP DESTROY test_mq test_group" is executed, the pending data in the test_ group will be cleared?
yes. Please see the following test steps:
Got it. Thanks
Comment From: guybe7
for the record: this is a known limitation (we don't want to iterate all PELs of all groups and delete entries that were trimmed)
starting from Redis 7, using XCLAIM or XAUTOCLAIM so that one of these commands hits a deleted entry will cause its removal from the PEL