Ian Maxon has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2256

Change subject: [ASTERIXDB-1708] Ensure minFirstLSN
......................................................................

[ASTERIXDB-1708] Ensure minFirstLSN

Add a sanity check when getting the first LSN, such that
it is not older than the last hard checkpoint

Change-Id: Icff1a520af24c8fac8e5836cdbf46425b78b1260
---
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/56/2256/1

diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java
index f458688..093225a 100644
--- 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/RecoveryManager.java
@@ -506,6 +506,13 @@
         try {
             long localMinFirstLSN = getLocalMinFirstLSN();
             firstLSN = Math.max(firstLSN, localMinFirstLSN);
+            List<Long> logFileIds = logMgr.getLogFileIds();
+            if(logFileIds.size() > 0){
+                Collections.sort(logFileIds);
+                long minLog = logFileIds.get(0);
+                firstLSN = Math.max(firstLSN,minLog);
+            }
+
         } catch (HyracksDataException e) {
             throw new ACIDException(e);
         }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2256
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icff1a520af24c8fac8e5836cdbf46425b78b1260
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <ima...@apache.org>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu>

Reply via email to