You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/05/06 07:53:34 UTC

[GitHub] [rocketmq] Oliverwqcwrw opened a new issue, #4247: The beginTimestamp can be updated to second Index data

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

   
   **BUG REPORT**
   
   1. Please describe the issue you observed:
   
   In `org.apache.rocketmq.store.index.IndexFile#putKey`
   
   > if (this.indexHeader.getIndexCount() <= 1) {
                       this.indexHeader.setBeginPhyOffset(phyOffset);
                       this.indexHeader.setBeginTimestamp(storeTimestamp);
                   }
   
   When the second message is added to the IndexFile, beginPhyOffset and beginTimestamp will still be updated because it satisfies indexCount less than or equal to 1
   
   - What is expected to see?
   
   > if (this.indexHeader.getIndexCount() < 1) {
                       this.indexHeader.setBeginPhyOffset(phyOffset);
                       this.indexHeader.setBeginTimestamp(storeTimestamp);
                   }if (this.indexHeader.getIndexCount() <= 1) {
                       this.indexHeader.setBeginPhyOffset(phyOffset);
                       this.indexHeader.setBeginTimestamp(storeTimestamp);
                   }
   
   
   
   2. Please tell us about your environment:
   
   version:4.9.3
   


-- 
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: dev-unsubscribe@rocketmq.apache.org.apache.org

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


[GitHub] [rocketmq] Oliverwqcwrw closed issue #4247: The beginTimestamp can be updated to second Index data

Posted by GitBox <gi...@apache.org>.
Oliverwqcwrw closed issue #4247: The beginTimestamp can be updated to second Index data
URL: https://github.com/apache/rocketmq/issues/4247


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] Oliverwqcwrw commented on issue #4247: The beginTimestamp can be updated to second Index data

Posted by GitBox <gi...@apache.org>.
Oliverwqcwrw commented on issue #4247:
URL: https://github.com/apache/rocketmq/issues/4247#issuecomment-1119365372

   IndexCount defaults to 1, so this is fine,I close the issue


-- 
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: dev-unsubscribe@rocketmq.apache.org

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