waterWang opened a new pull request, #10687: URL: https://github.com/apache/rocketmq/pull/10687
### Which Issue(s) This PR Fixes - Fixes #10656 ### Brief Description The recovery constructor of `IndexStoreFile` reads `endTimestamp` from `INDEX_BEGIN_TIME_STAMP` (offset 4) instead of `INDEX_END_TIME_STAMP` (offset 12). The write path (lines 192-193) correctly stores `endTimestamp` at `INDEX_END_TIME_STAMP`: ```java byteBuffer.putLong(INDEX_BEGIN_TIME_STAMP, this.beginTimestamp.get()); byteBuffer.putLong(INDEX_END_TIME_STAMP, this.endTimestamp.get()); ``` But the recovery constructor (line 117) reads from the wrong offset: ```java // Before (bug): this.endTimestamp.set(byteBuffer.getLong(INDEX_BEGIN_TIME_STAMP)); // After (fix): this.endTimestamp.set(byteBuffer.getLong(INDEX_END_TIME_STAMP)); ``` This causes the end timestamp to become the begin timestamp after reopening a tiered index file, which can cause valid query results to be incorrectly skipped. ### How Did You Test This Change? The fix is a one-line offset correction. The change is trivially verified by inspection: the constant `INDEX_END_TIME_STAMP = 12` is used correctly in the write path but was incorrectly replaced with `INDEX_BEGIN_TIME_STAMP = 4` in the recovery path. No functional logic change. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
