Murtadha Hubail has posted comments on this change. Change subject: [ASTERIXDB-1708] Prevent log deletion during scan ......................................................................
Patch Set 6: (2 comments) https://asterix-gerrit.ics.uci.edu/#/c/2256/6/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: PS6, Line 50: void unlockLSN(long lsn); how about this? void secure(TxnId id); You can call this in TransactionManager before the rollback. Make it syncrhonized in CheckpointManager and just use a hash map to store the secured txnId and the current low water mark. Whenever a checkpoint attempt happens after that, check the minimum secured low water mark in the map and fail the checkpoint if its target is greater than that minimum. For any other reader, you can use a dummy txnId (e.g. -1) just to secure the low water mark. PS6, Line 52: lockLSN How about this? void completed(TxnId id); Call this in the finally block in TransactionManager in about. Make the method synchronized in CheckpointManager and just remove the txnid from the secured txns map. -- 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: 6 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Ian Maxon <ima...@apache.org> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Ian Maxon <ima...@apache.org> Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Gerrit-Reviewer: Luo Chen <cl...@uci.edu> Gerrit-Reviewer: Michael Blow <mb...@apache.org> Gerrit-Reviewer: Murtadha Hubail <mhub...@apache.org> Gerrit-Reviewer: abdullah alamoudi <bamou...@gmail.com> Gerrit-HasComments: Yes