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 2020/09/23 13:58:55 UTC

[GitHub] [accumulo] cradal commented on a change in pull request #1670: #1631 - Tablet in memory compaction ID is updated before metadata write

cradal commented on a change in pull request #1670:
URL: https://github.com/apache/accumulo/pull/1670#discussion_r493615509



##########
File path: server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableUtils.java
##########
@@ -441,10 +441,17 @@ private UserCompactionHelper(CompactionConfig compactionConfig, Tablet tablet,
       }
 
       if (selectedFiles.isEmpty()) {
-        tablet.setLastCompactionID(compactionId);
-
-        MetadataTableUtil.updateTabletCompactID(tablet.getExtent(), compactionId,
-            tablet.getTabletServer().getContext(), tablet.getTabletServer().getLock());
+        Boolean updateMetadataTabletFail = false;
+        try {
+          MetadataTableUtil.updateTabletCompactID(tablet.getExtent(), compactionId,
+              tablet.getTabletServer().getContext(), tablet.getTabletServer().getLock());
+        } catch (Exception exc) {
+          updateMetadataTabletFail = true;
+          log.error(exc.getMessage());
+        }

Review comment:
       I see what you mean. updateTabletCompactID does not throw any exception. I thought that this would guarantee no attempts to set the LastCompactionID if the Metadata table update failed. Thinking it over, simply reordering the method calls should work.  




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

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