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 2022/10/18 17:10:41 UTC

[GitHub] [accumulo] keith-turner commented on a diff in pull request #3028: fixes #2667 wait for metadata write in tablet close

keith-turner commented on code in PR #3028:
URL: https://github.com/apache/accumulo/pull/3028#discussion_r998504087


##########
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java:
##########
@@ -1515,12 +1515,14 @@ public synchronized void close() {
 
       closed = true;
 
-      // wait while internal jobs are running, external compactions are committing or the status of
-      // chops is MARKING, but do not wait on external compactions that are running
+      // Wait while internal jobs are running or external compactions are committing. When
+      // chopStatus is MARKING or selectStatus is SELECTING, there may be metadata table writes so
+      // wait on those. Do not wait on external compactions that are running.
       while (runningJobs.stream()
           .anyMatch(job -> !((CompactionExecutorIdImpl) job.getExecutor()).isExternalId())
           || !externalCompactionsCommitting.isEmpty()
-          || fileMgr.chopStatus == ChopSelectionStatus.MARKING) {
+          || fileMgr.chopStatus == ChopSelectionStatus.MARKING
+          || fileMgr.selectStatus == FileSelectionStatus.SELECTING) {

Review Comment:
   > What would happen if you have external compactions running and an internal compaction is SELECTING for the same tablet? It seems like the close would go through and if the other conditions in https://github.com/apache/accumulo/issues/2667#issuecomment-1282120602 are met, we would get the same error.
   
   I think that is ok, it does not close when these conditions are met it waits until none of the conditions are met to proceed with close.  Tablet.close() calls CompactableImpl.close() and waits for it to return before doing its validation.  So hopefully the tablet will wait for any in flight metadata writes happening in CompactableImpl now before doing its metadata validation.   



-- 
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: notifications-unsubscribe@accumulo.apache.org

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