You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2018/06/22 20:19:17 UTC

[GitHub] ctubbsii commented on a change in pull request #541: fixes #538 fix WAL recovery code

ctubbsii commented on a change in pull request #541: fixes #538 fix WAL recovery code
URL: https://github.com/apache/accumulo/pull/541#discussion_r197550938
 
 

 ##########
 File path: server/tserver/src/main/java/org/apache/accumulo/tserver/log/SortedLogRecovery.java
 ##########
 @@ -190,38 +189,29 @@ private long findLastStartToFinish(List<Path> recoveryLogs, Set<String> tabletFi
           lastStart = key.seq;
           lastStartFile = key.filename;
         } else if (key.event == COMPACTION_FINISH) {
-          if (lastEvent == null) {
-            firstEventWasFinish = true;
-          } else if (lastEvent == COMPACTION_FINISH) {
-            throw new IllegalStateException(
-                "Saw consecutive COMPACTION_FINISH events " + key.tabletId + " " + key.seq);
-          } else {
-            if (key.seq <= lastStart) {
-              throw new IllegalStateException(
-                  "Compaction finish <= start " + lastStart + " " + key.seq);
-            }
-            recoverySeq = lastStart;
-            lastStartFile = null;
-            sawStartFinish = true;
-          }
+          checkState(key.seq >= lastFinish); // should only fail if bug elsewhere
+          checkState(key.seq > lastStart, "Compaction finish <= start %s %s %s", key.tabletId,
 
 Review comment:
   This might be better as a more specific check; something like: `checkState(key.seq == lastStart + 1, ...);`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services