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 2021/12/22 13:11:47 UTC

[GitHub] [accumulo] dlmarion commented on a change in pull request #2397: Add consistency checks for lastFlushID and lastCompactID

dlmarion commented on a change in pull request #2397:
URL: https://github.com/apache/accumulo/pull/2397#discussion_r773875802



##########
File path: server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
##########
@@ -1412,12 +1412,40 @@ private void closeConsistencyCheck() {
 
     if (!otherLogs.isEmpty() || !currentLogs.isEmpty() || !referencedLogs.isEmpty()) {
       String msg = "Closed tablet " + extent + " has walog entries in memory currentLogs = "
-          + currentLogs + "  otherLogs = " + otherLogs + " refererncedLogs = " + referencedLogs;
+          + currentLogs + "  otherLogs = " + otherLogs + " referencedLogs = " + referencedLogs;
       log.error(msg);
       throw new RuntimeException(msg);
     }
 
-    // TODO check lastFlushID and lostCompactID - ACCUMULO-1290
+    // If a table hasn't been flushed before it was closed then lastFlushID will be -1 while
+    // getFlushID will be 0.

Review comment:
       I'm not sure that this comment is correct. In fact, I'm not sure that the original comment from 2013 applies at this point. From what my IDE search found, ZTABLE_FLUSH_ID is only set in [ManagerClientServiceHandler#initiateFlush](https://github.com/apache/accumulo/blob/main/server/manager/src/main/java/org/apache/accumulo/manager/ManagerClientServiceHandler.java#L125) which IIRC is used when someone submits a `flush` command in the shell. From what I can tell, if a Tablet is hosted on a TabletServer in the normal course of business and minor compactions occur naturally, then `lastFlushID` will be equal to the value passed in the Tablet constructor and `flushID` will be equal to the value stored in ZooKeeper.




-- 
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