milleruntime commented on a change in pull request #2235:
URL: https://github.com/apache/accumulo/pull/2235#discussion_r722135088



##########
File path: 
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
##########
@@ -739,11 +749,25 @@ private void checkifChopComplete(Set<StoredTabletFile> 
allFiles) {
     boolean completed;
 
     synchronized (this) {
+      if (closed) {
+        // if closed, do not attempt to transition to the MARKING state
+        return;
+      }
+      // when this returns true it means we transitioned to the MARKING state
       completed = fileMgr.finishChop(allFiles);
     }
 
     if (completed) {
-      markChopped();
+      try {
+        markChopped();
+      } finally {
+        synchronized (this) {
+          // transition the state from MARKING to NOT_ACTIVE
+          fileMgr.finishMarkingChop();

Review comment:
       Could you do something with the boolean that is returned from this 
method? It might not matter but since you are checking the state and returning 
an outcome, maybe a false should be handled.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to