GenerousMan opened a new issue, #6665:
URL: https://github.com/apache/rocketmq/issues/6665

   ### 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.
   
   ### Describe the Bug
   
   The confirmOffset is not reseted after truncating.
   
   ### Steps to Reproduce
   
   3 Controllers, 3 Brokers.
   
   The calculating process of truncateInvalidMsg has something wrong here:
   
   
![image](https://user-images.githubusercontent.com/21073949/235296690-0a041437-2897-4c80-8d8e-752c0983615e.png)
   
   The reputOffset was wrongly calculated, which leads to more and more 
messages were truncated.
   
   
   ### What Did You Expect to See?
   
   No message lost.
   
   ### What Did You See Instead?
   
   
![image](https://user-images.githubusercontent.com/21073949/235296746-e950df03-e00d-4ad0-8478-10826e96f040.png)
   
   ### Additional Context
   
   The reputFromOffset is re-calculated here:
   
![image](https://user-images.githubusercontent.com/21073949/235296671-0575148f-829e-453a-9a06-e1658e46da58.png)
   
   It uses confirmOffset:
   
![image](https://user-images.githubusercontent.com/21073949/235296838-33af88c0-2b65-478c-a542-68d1d12b4665.png)
   
![image](https://user-images.githubusercontent.com/21073949/235296856-5ac62ea5-f53a-4312-8156-12f59ce34182.png)
   
   The reputFromOffset is reseted, but the confirmOffset is not reseted:
   
![image](https://user-images.githubusercontent.com/21073949/235296919-78134111-7f96-43fc-9774-1c9627bb7e4b.png)
   


-- 
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