Murtadha Hubail has posted comments on this change. Change subject: [ASTERIXDB-1708] Prevent log deletion during scan ......................................................................
Patch Set 12: (6 comments) https://asterix-gerrit.ics.uci.edu/#/c/2256/12/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java File asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java: PS12, Line 514: final TxnId randomDummyTxnId = new TxnId(ThreadLocalRandom.current().nextInt(Integer.MIN_VALUE, -1)); private static final TxnId recoveryTxnId = new TxnId(-1); https://asterix-gerrit.ics.uci.edu/#/c/2256/12/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/transactions/ICheckpointManager.java File asterixdb/asterix-common/src/main/java/org/apache/asterix/common/transactions/ICheckpointManager.java: Line 56: remove Line 64: remove https://asterix-gerrit.ics.uci.edu/#/c/2256/12/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/AbstractCheckpointManager.java File asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/AbstractCheckpointManager.java: Line 31: import java.util.Arrays; revert? https://asterix-gerrit.ics.uci.edu/#/c/2256/12/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/CheckpointManager.java File asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/CheckpointManager.java: PS12, Line 75: return minFirstLSN; you shouldn't return this here since no checkpoint was actually captured at this lsn. Just check with the target before checking the current minFirstLSN: final long minSecuredLsn = getMinSecuredLsn(); if (checkpointTargetLSN >= minSecuredLsn) { return minSecuredLsn; } PS12, Line 93: -1 if you are going to use special values, define them as constants. I prefer that you replace this by the following and remove the special value: return securedTxn.values().stream().min(Long::compareTo).orElse(Long.MAX_VALUE); -- To view, visit https://asterix-gerrit.ics.uci.edu/2256 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icff1a520af24c8fac8e5836cdbf46425b78b1260 Gerrit-PatchSet: 12 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Ian Maxon <[email protected]> Gerrit-Reviewer: Ian Maxon <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Luo Chen <[email protected]> Gerrit-Reviewer: Michael Blow <[email protected]> Gerrit-Reviewer: Murtadha Hubail <[email protected]> Gerrit-Reviewer: abdullah alamoudi <[email protected]> Gerrit-HasComments: Yes
