You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "redlsz (via GitHub)" <gi...@apache.org> on 2024/01/05 06:32:27 UTC
[I] [Bug] PopReviveService may revive incorrect message [rocketmq]
redlsz opened a new issue, #7724:
URL: https://github.com/apache/rocketmq/issues/7724
### Before Creating the Bug Report
- [X] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq/discussions).
- [X] I have searched the [GitHub Issues](https://github.com/apache/rocketmq/issues) and [GitHub Discussions](https://github.com/apache/rocketmq/discussions) of this repository and believe that this is not a duplicate.
- [X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
### Runtime platform environment
centos7
### RocketMQ version
5.1.0
### JDK Version
JDK 1.8
### Describe the Bug
A message is popped up again after being acknowledged, even appears twice at the same time. No offset-reset or service-reboot.
queryMsgByOffset results:
<img width="628" alt="image" src="https://github.com/apache/rocketmq/assets/103550934/bfcb7d91-6a48-458d-9962-e36a46dc8fa5">
It can be noticed that broker store two identical messages (same UNIQ_KEY) to pop-retry topic at the same time. And this message has actually been acknowledged before.
After reviewing the codes, we have a suspicion about the _reviveMsgFromCk_:
When revive a message from a PopCheckPoint, the original message should be read out from store firstly. But what the _getBizMessage_ actual does is reading one message **starting from** the specified queue offset, instead of message **of** the specified queue offset. In other words, incorrect message may be read out and revived in some scenarios.
(In addition, although the pop-time-check may avoids the above issue to some extent, we should ensure that a message's pop-time will never be less than its store-time.)
<img width="1530" alt="image" src="https://github.com/apache/rocketmq/assets/103550934/2fbb1314-c649-4fe9-924e-3a6f8706fef0">
### Steps to Reproduce
A possible case:
message in queue:
m0(storeTime=t0,commitlogfile0), m1(storeTime=t1,commitlogfile1)
timeline:
t2 -> Pop m0 (donnot ack)
t3 -> commitlogfile0 is expired and deleted
t4 -> invisible timeout and try revive m0, but the actual read and revived messag is m1
(t0<t1<t2<t3<t4)
### What Did You Expect to See?
Message will not be received again after being acknowledged.
### What Did You See Instead?
Message is received again after being acknowledged.
### Additional Context
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] PopReviveService may revive incorrect message [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7724:
URL: https://github.com/apache/rocketmq/issues/7724#issuecomment-2594186408
This issue was closed because it has been inactive for 3 days since being marked as stale.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] PopReviveService may revive incorrect message [rocketmq]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on issue #7724:
URL: https://github.com/apache/rocketmq/issues/7724#issuecomment-1888372936
描述的有点复杂,pop 消费的 ck 到期了,数据被清理,
此时 getBizMessage 拿到了 min offset 的消息,不一定满足 skip 的条件,导致 ck 产生 retry。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] PopReviveService may revive incorrect message [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #7724: [Bug] PopReviveService may revive incorrect message
URL: https://github.com/apache/rocketmq/issues/7724
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] PopReviveService may revive incorrect message [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7724:
URL: https://github.com/apache/rocketmq/issues/7724#issuecomment-2585488756
This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] PopReviveService may revive incorrect message [rocketmq]
Posted by "absolute8511 (via GitHub)" <gi...@apache.org>.
absolute8511 commented on issue #7724:
URL: https://github.com/apache/rocketmq/issues/7724#issuecomment-2795793518
Why is this not merged anyway? @lizhimins @redlsz
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org