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

Reply via email to