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

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

commit e347e8b45c9606ee2e3490f0e6685245fcbe56c3
Merge: 7d1a816791 6fe8b0c5f1
Author: Dave Marion <dlmar...@apache.org>
AuthorDate: Thu Jan 9 19:23:45 2025 +0000

    Merge branch '2.1' into 3.1

 .../java/org/apache/accumulo/core/conf/Property.java    |  3 +--
 .../apache/accumulo/tserver/session/SessionManager.java | 17 +++++++----------
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/session/SessionManager.java
index 564f25c019,0726c1997c..f34e331d7b
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/session/SessionManager.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/session/SessionManager.java
@@@ -66,9 -68,8 +66,7 @@@ import com.google.common.collect.Maps
  public class SessionManager {
    private static final Logger log = 
LoggerFactory.getLogger(SessionManager.class);
  
 -  private static final SecureRandom random = new SecureRandom();
    private final ConcurrentMap<Long,Session> sessions = new 
ConcurrentHashMap<>();
-   private final long maxIdle;
-   private final long maxUpdateIdle;
    private final BlockingQueue<Session> deferredCleanupQueue = new 
ArrayBlockingQueue<>(5000);
    private final Long expiredSessionMarker = (long) -1;
    private final ServerContext ctx;
@@@ -76,14 -77,10 +74,10 @@@
  
    public SessionManager(ServerContext context) {
      this.ctx = context;
-     final AccumuloConfiguration aconf = context.getConfiguration();
-     maxUpdateIdle = 
aconf.getTimeInMillis(Property.TSERV_UPDATE_SESSION_MAXIDLE);
-     maxIdle = aconf.getTimeInMillis(Property.TSERV_SESSION_MAXIDLE);
- 
-     Runnable r = () -> sweep(maxIdle, maxUpdateIdle);
- 
+     long maxIdle = 
ctx.getConfiguration().getTimeInMillis(Property.TSERV_SESSION_MAXIDLE);
+     Runnable r = () -> sweep(ctx);
      
ThreadPools.watchCriticalScheduledTask(context.getScheduledExecutor().scheduleWithFixedDelay(r,
 -        0, Math.max(maxIdle / 2, 1000), TimeUnit.MILLISECONDS));
 +        0, Math.max(maxIdle / 2, 1000), MILLISECONDS));
    }
  
    public long createSession(Session session, boolean reserve) {

Reply via email to