bxfjb commented on code in PR #7599: URL: https://github.com/apache/rocketmq/pull/7599#discussion_r1456989735
########## store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java: ########## @@ -343,14 +427,57 @@ private void recover(long maxPhyOffsetOfConsumeQueue) throws RocksDBException { log.info("Will set the initial commitlog offset={} for dledger", dividedCommitlogOffset); } + private boolean isMmapFileMatchedRecover(final MmapFile mmapFile) { + ByteBuffer byteBuffer = mmapFile.sliceByteBuffer(); + + int magicCode = byteBuffer.getInt(DLedgerEntry.BODY_OFFSET + MessageDecoder.MESSAGE_MAGIC_CODE_POSITION); + if (magicCode != MESSAGE_MAGIC_CODE) { + return false; + } + + int storeTimestampPosition; + int sysFlag = byteBuffer.getInt(MessageDecoder.SYSFLAG_POSITION); Review Comment: fixed and thx -- 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: commits-unsubscr...@rocketmq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org