提交 ffc733a4 编写于 作者: D dongeforever

Polish log for reput offset

上级 93426749
......@@ -237,6 +237,9 @@ public class DefaultMessageStore implements MessageStore {
}
}
log.info("[SetReputOffset] maxPhysicalPosInLogicQueue={} clMaxOffset={} clConfirmedOffset={}",
maxPhysicalPosInLogicQueue, this.commitLog.getMaxOffset(), this.commitLog.getConfirmOffset());
if (this.getMessageStoreConfig().isDuplicationEnable()) {
this.reputMessageService.setReputFromOffset(Math.min(maxPhysicalPosInLogicQueue, this.commitLog.getConfirmOffset()));
} else {
......
......@@ -117,7 +117,11 @@ public class DLegerCommitLog extends CommitLog {
}
public long getMaxOffset() {
return this.dLegerFileList.getMaxWrotePosition();
if (this.dLegerFileStore.getCommittedPos() != -1) {
return dLegerFileStore.getCommittedPos();
} else {
return this.dLegerFileList.getMaxWrotePosition();
}
}
public long remainHowManyDataToCommit() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册