This is an automated email from the ASF dual-hosted git repository.
jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new 119a0bec66 [ISSUE #9121] Fix CRC32 Check Failing When Value is 0
119a0bec66 is described below
commit 119a0bec66375b721aa935675c5ad0a11838445a
Author: guyinyou <[email protected]>
AuthorDate: Sat Jan 11 10:27:46 2025 +0800
[ISSUE #9121] Fix CRC32 Check Failing When Value is 0
---
store/src/main/java/org/apache/rocketmq/store/CommitLog.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/store/src/main/java/org/apache/rocketmq/store/CommitLog.java
b/store/src/main/java/org/apache/rocketmq/store/CommitLog.java
index ff96bf1066..b061aa7a0d 100644
--- a/store/src/main/java/org/apache/rocketmq/store/CommitLog.java
+++ b/store/src/main/java/org/apache/rocketmq/store/CommitLog.java
@@ -583,7 +583,7 @@ public class CommitLog implements Swappable {
}
}
}
- if (expectedCRC > 0) {
+ if (expectedCRC >= 0) {
ByteBuffer tmpBuffer = byteBuffer.duplicate();
tmpBuffer.position(tmpBuffer.position() - totalSize);
tmpBuffer.limit(tmpBuffer.position() + totalSize -
CommitLog.CRC32_RESERVED_LEN);