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

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

commit b694d6cbf7c4a9b8f02119fb46434dc63e657021
Merge: bbdee9f639 c385086872
Author: Dave Marion <dlmar...@apache.org>
AuthorDate: Thu Mar 6 19:43:54 2025 +0000

    Merge branch '3.1'

 .../java/org/apache/accumulo/server/AbstractServer.java     |  7 +++++++
 .../java/org/apache/accumulo/gc/SimpleGarbageCollector.java |  8 ++++++++
 .../main/java/org/apache/accumulo/tserver/ScanServer.java   | 13 ++++++++++++-
 3 files changed, 27 insertions(+), 1 deletion(-)

diff --cc 
server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java
index f716c3172a,f82f420c4f..be1c6fba0c
--- a/server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java
@@@ -371,4 -276,11 +371,11 @@@ public abstract class AbstractServe
    @Override
    public void close() {}
  
+   protected void waitForUpgrade() throws InterruptedException {
+     while (AccumuloDataVersion.getCurrentVersion(getContext()) < 
AccumuloDataVersion.get()) {
 -      LOG.info("Waiting for upgrade to complete.");
++      log.info("Waiting for upgrade to complete.");
+       Thread.sleep(1000);
+     }
+   }
+ 
  }
diff --cc 
server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
index 8bd3e83247,d74c84701f..2d7afe261d
--- a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
+++ b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
@@@ -154,6 -140,14 +154,14 @@@ public class SimpleGarbageCollector ext
    @Override
    @SuppressFBWarnings(value = "DM_EXIT", justification = "main class can call 
System.exit")
    public void run() {
+ 
+     try {
+       waitForUpgrade();
+     } catch (InterruptedException e) {
 -      LOG.error("Interrupted while waiting for upgrade to complete, 
exiting...");
++      log.error("Interrupted while waiting for upgrade to complete, 
exiting...");
+       System.exit(1);
+     }
+ 
      final VolumeManager fs = getContext().getVolumeManager();
  
      // Sleep for an initial period, giving the manager time to start up and
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/ScanServer.java
index 59949675ac,27e3fe0d9a..535d100dfe
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/ScanServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/ScanServer.java
@@@ -133,10 -132,12 +133,12 @@@ import com.google.common.base.Precondit
  import com.google.common.collect.Sets;
  import com.google.common.net.HostAndPort;
  
+ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+ 
  public class ScanServer extends AbstractServer
 -    implements TabletScanClientService.Iface, TabletHostingServer, 
ServerProcessService.Iface {
 +    implements TabletScanClientService.Iface, TabletHostingServer {
  
 -  private static final Logger log = LoggerFactory.getLogger(ScanServer.class);
 +  private static final Logger LOG = LoggerFactory.getLogger(ScanServer.class);
  
    private static class TabletMetadataLoader implements 
CacheLoader<KeyExtent,TabletMetadata> {
  

Reply via email to