rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinrongt...@apache.org
Subject [rocketmq] branch develop updated: fix increase hashSlot value
Date Mon, 25 May 2020 08:28:50 GMT
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 a14cf63  fix increase hashSlot value
     new a8f7730  Merge pull request #2018 from imaffe/affe-0520-fix-slotvalue
a14cf63 is described below

commit a14cf634a56abefdec3cef7531d2b855dff1c939
Author: affe <affeisme@gmail.com>
AuthorDate: Wed May 20 10:57:48 2020 -0700

    fix increase hashSlot value
---
 store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java b/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java
index 3d76b73..e513edf 100644
--- a/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java
+++ b/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java
@@ -134,7 +134,9 @@ public class IndexFile {
                     this.indexHeader.setBeginTimestamp(storeTimestamp);
                 }
 
-                this.indexHeader.incHashSlotCount();
+                if (invalidIndex == slotValue) {
+                    this.indexHeader.incHashSlotCount();
+                }
                 this.indexHeader.incIndexCount();
                 this.indexHeader.setEndPhyOffset(phyOffset);
                 this.indexHeader.setEndTimestamp(storeTimestamp);


Mime
View raw message