HScarb opened a new issue #3868:
URL: https://github.com/apache/rocketmq/issues/3868
In IndexService#load
```java
IndexFile f = new IndexFile(file.getPath(),
this.hashSlotNum, this.indexNum, 0, 0);
f.load();
if (!lastExitOK) {
if (f.getEndTimestamp() >
this.defaultMessageStore.getStoreCheckpoint()
.getIndexMsgTimestamp()) {
f.destroy(0);
continue;
}
}
log.info("load index file OK, " + f.getFileName());
this.indexFileList.add(f);
```
* `f.getEndTimestamp()` indicates file's last write timestamp
* `indexMsgTimestamp` in `StoreCheckpoint` indicates indexfile last flush
timestamp
Consider a situation that index file last write timestamp is later than
flush timestamp, but first write timestamp is earlier than flush timestamp,
what will happen is that the file with some valid data will be destroy and some
index data will be lost.

Is this design like so or it is a bug?
--
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]