提交 1e358ae3 编写于 作者: D dongeforever

Annotate

上级 43753d6e
...@@ -270,6 +270,8 @@ public class DLedgerCommitLog extends CommitLog { ...@@ -270,6 +270,8 @@ public class DLedgerCommitLog extends CommitLog {
} }
//Indicate that, it is the first time to load mixed commitlog, need to recover the old commitlog //Indicate that, it is the first time to load mixed commitlog, need to recover the old commitlog
isInrecoveringOldCommitlog = true; isInrecoveringOldCommitlog = true;
//TODO only do the normal recover
//No need the abnormal recover
if (lastOk) { if (lastOk) {
super.recoverNormally(maxPhyOffsetOfConsumeQueue); super.recoverNormally(maxPhyOffsetOfConsumeQueue);
} else { } else {
...@@ -300,6 +302,7 @@ public class DLedgerCommitLog extends CommitLog { ...@@ -300,6 +302,7 @@ public class DLedgerCommitLog extends CommitLog {
byteBuffer.putInt(mappedFile.getFileSize() - mappedFile.getWrotePosition()); byteBuffer.putInt(mappedFile.getFileSize() - mappedFile.getWrotePosition());
byteBuffer.putInt(BLANK_MAGIC_CODE); byteBuffer.putInt(BLANK_MAGIC_CODE);
mappedFile.flush(0); mappedFile.flush(0);
//TODO already set
mappedFile.setWrotePosition(mappedFile.getFileSize()); mappedFile.setWrotePosition(mappedFile.getFileSize());
mappedFile.setCommittedPosition(mappedFile.getFileSize()); mappedFile.setCommittedPosition(mappedFile.getFileSize());
mappedFile.setFlushedPosition(mappedFile.getFileSize()); mappedFile.setFlushedPosition(mappedFile.getFileSize());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册