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:
[email protected]


Reply via email to