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 2022/02/26 19:32:13 UTC

[GitHub] [accumulo] Manno15 commented on a change in pull request #2531: Add isPresent before completing consistency check

Manno15 commented on a change in pull request #2531:
URL: https://github.com/apache/accumulo/pull/2531#discussion_r815345890



##########
File path: server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
##########
@@ -1401,6 +1401,22 @@ private void closeConsistencyCheck() {
         throw new RuntimeException(msg);
       }
 
+      if (tabletMeta.getFlushId().isPresent()
+          && tabletMeta.getFlushId().orElse(-1) != lastFlushID) {
+        String msg = "Closed tablet " + extent + " lastFlushID is inconsistent with metadata : "
+            + tabletMeta.getFlushId().orElse(-1) + " != " + lastFlushID;
+        log.error(msg);
+        throw new RuntimeException(msg);
+      }
+
+      if (tabletMeta.getCompactId().isPresent()
+          && tabletMeta.getCompactId().orElse(-1) != lastCompactID) {
+        String msg = "Closed tablet " + extent + " lastCompactID is inconsistent with metadata : "
+            + tabletMeta.getCompactId().orElse(-1) + " != " + lastCompactID;
+        log.error(msg);
+        throw new RuntimeException(msg);
+      }

Review comment:
       Your changes look good. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org