ctubbsii commented on code in PR #3685:
URL: https://github.com/apache/accumulo/pull/3685#discussion_r1291532009


##########
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java:
##########
@@ -902,7 +902,60 @@ void initiateClose(boolean saveState) {
     log.trace("initiateClose(saveState={}) {}", saveState, getExtent());
 
     MinorCompactionTask mct = null;
+    if (saveState) {
+      try {
+        synchronized (this) {
+          // Wait for any running minor compaction before trying to start 
another. This is done for
+          // the case where the current in memory map has a lot of data. So 
wait for the running
+          // minor compaction and then start compacting the current in memory 
map before closing.
+          getTabletMemory().waitForMinC();
+        }
+        mct = createMinorCompactionTask(getFlushID(), 
MinorCompactionReason.CLOSE);
+      } catch (NoNodeException e) {
+        throw new RuntimeException("Exception on " + extent + " during prep 
for MinC", e);

Review Comment:
   Is there a more specific exception that can be thrown here?



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