[ISSUE #5307] Remove redundant if statements (#5314)

This commit is contained in:
Nowinkey
2022-10-27 16:35:41 +08:00
committed by GitHub
parent 5d0db77f0c
commit 7a4fa6b96e
@@ -348,12 +348,7 @@ public class DefaultMessageStore implements MessageStore {
lockFile.getChannel().write(ByteBuffer.wrap("lock".getBytes(StandardCharsets.UTF_8)));
lockFile.getChannel().force(true);
if (this.getMessageStoreConfig().isDuplicationEnable()) {
this.reputMessageService.setReputFromOffset(this.commitLog.getConfirmOffset());
} else {
// It is [recover]'s responsibility to fully dispatch the commit log data before the max offset of commit log.
this.reputMessageService.setReputFromOffset(this.commitLog.getMaxOffset());
}
this.reputMessageService.setReputFromOffset(this.commitLog.getConfirmOffset());
this.reputMessageService.start();
// Checking is not necessary, as long as the dLedger's implementation exactly follows the definition of Recover,