cserwen edited a comment on issue #3491:
URL: https://github.com/apache/rocketmq/issues/3491#issuecomment-971508756


   > org.apache.rocketmq.broker.processor.PopMessageProcessor#popMsgFromQueue 
Offset can also be submitted in this method, so not only the threads of 
PopBufferMergeService can submit offset.
   
   Ok, how should we solve this problem?
   Besides, I found another bug. If the broker restart when the consumer is 
running, these lines will be executed. Then the consumeOffset will be set as 0 
and consume consume from first. The log is as follows:
   ```log
   2021-11-17 20:16:12 WARN PullMessageThread_21 - Pop initial offset, because 
store is no correct, pop-1@consumer@3, 5384577->null
   2021-11-17 20:16:12 WARN PullMessageThread_69 - Pop initial offset, because 
store is no correct, pop-1@consumer@2, 5384587->null
   2021-11-17 20:16:12 WARN PullMessageThread_3 - Pop initial offset, because 
store is no correct, pop-1@consumer@0, 26128469->null
   2021-11-17 20:16:12 WARN PullMessageThread_31 - Pop initial offset, because 
store is no correct, pop-1@consumer@1, 12384558->null
   2021-11-17 20:16:12 WARN PullMessageThread_78 - Pop initial offset, because 
store is no correct, %RETRY%consumer_pop-1@consumer@0, 143690->null
   ```
   **But the actual consumeOffset is correct.** 
   
   Is it right to set offset as 0 when `getMessage()` return null ?
   
https://github.com/apache/rocketmq/blob/4506f34e24714ec4d6ac37babd8f096632fd6b1c/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java#L526
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to