This is an automated email from the ASF dual-hosted git repository.

kturner pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/main by this push:
     new 8531c62d61 fixes #2667 wait for metadata write in tablet close (#3028)
8531c62d61 is described below

commit 8531c62d611a616225a889f42be4e7f723512564
Author: Keith Turner <ktur...@apache.org>
AuthorDate: Tue Oct 18 12:50:13 2022 +0100

    fixes #2667 wait for metadata write in tablet close (#3028)
---
 .../java/org/apache/accumulo/tserver/tablet/CompactableImpl.java  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
index 20b125eea5..257322e207 100644
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
@@ -1528,12 +1528,14 @@ public class CompactableImpl implements Compactable {
 
       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) {
         try {
           wait(50);
         } catch (InterruptedException e) {

Reply via email to