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

   ### 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
   
   any
   
   ### RocketMQ version
   
   any
   
   ### JDK Version
   
   _No response_
   
   ### Describe the Bug
   
   In RocketMQ, during broker restarts, a data integrity check is performed 
using CRC32 checksums to validate stored messages. If the CRC32 value of a 
message happens to be 0, it is incorrectly flagged as invalid, leading to the 
erroneous truncation of normal data and potential message loss.
   
   ### Steps to Reproduce
   
   Ensure that RocketMQ is configured to perform CRC32 validation on stored 
messages during startup.
   Store messages with payloads that produce a CRC32 checksum of 0.
   Restart the RocketMQ broker.
   Observe that the stored messages with a CRC32 checksum of 0 are not loaded 
correctly and may be discarded due to the perceived checksum failure.
   
   ### What Did You Expect to See?
   
   Upon restarting the broker, all messages with valid CRC32 checksums, 
including those where the checksum value is 0, should be processed normally 
without being erroneously considered as failed validations. The system should 
accurately distinguish between a successful checksum of 0 and an actual 
checksum validation failure.
   
   ### What Did You See Instead?
   
   During the broker restart, any stored message with a CRC32 checksum value of 
0 was treated as having a failed validation check. This resulted in the message 
not being properly restored from storage, leading to data truncation and 
message loss.
   
   ### 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-unsubscr...@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to