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/22 16:39:29 UTC

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

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



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

Review comment:
       Should use primitive, rather than boxed form.
   
   ```suggestion
           boolean updateMetadataTabletFail = false;
   ```

##########
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:
       This catches exceptions that were previously thrown. Is this a valid change in behavior? Why wouldn't it be sufficient to simply reorder these lines, and let the exception be thrown?




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