jianglianggithub commented on issue #1919: org.apache.rocketmq.store.index.IndexFile#putKey URL: https://github.com/apache/rocketmq/issues/1919#issuecomment-610754899 该逻辑是发生在 product 发送消息后。 由ReputMessageService 服务线程 派发到 org.apache.rocketmq.store.DefaultMessageStore#doDispatch, org.apache.rocketmq.store.index.IndexService#buildIndex, 来更新索引文件的。 在IndexFile 的属性 indexHeader 的属性 hashSlotCount 是用来记录 在索引文件 hashSlot 的使用个数的 在原来的代码里面 每一个消息 会创建2个索引 一个索引= TopicName + UniqKey 另外一个索引是 TopicName + keys 【由product发送消息的时候指定】 我的意思是 如果发送 2条相同的 消息 如果topic 和 kyes 想同的话 那么 原来的代码记录的 hashSlot 使用个数 =4 但是 其实使用只有3个 hashSlot 因为有一个 hashSlot 在第一次发送消息的时候已经被使用了 出现了 哈希冲突
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
