accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [accumulo] hkeebler opened a new pull request #1199: Fix #1122 Added concurrent structures to ThriftTransportPool
Date Mon, 01 Jul 2019 19:00:07 GMT
hkeebler opened a new pull request #1199: Fix #1122 Added concurrent structures to ThriftTransportPool
   Also contains suggestions for removing syncrhonized blocks.
   (previous pull request was closed because wron branch was pushed)
   Syncrhronized blocks of text are commented out with "NOT NEEDED?"  in the diffs below.
These may not be necessary if the object constructs handle write/delete concurrency. But maybe
they are not that costly.
   Additionally - I have a question on the section of code below. The connections are closed
specifically after the sync block. It seems that since the "unreserved" is read and not deleted
from then someone could use one that is designated to close by the sync blck.
       synchronized (pool) {
            for (CachedConnections cachedConns : pool.getCache().values()) {
              Iterator<CachedConnection> iter = cachedConns.unreserved.iterator();
              while (iter.hasNext()) {
                CachedConnection cachedConnection =;
                if (System.currentTimeMillis() - cachedConnection.lastReturnTime > pool.killTime)
              for (CachedConnection cachedConnection : cachedConns.reserved.values()) {
            Iterator<Entry<ThriftTransportKey,Long>> iter = pool.errorTime.entrySet().iterator();
            while (iter.hasNext()) {
              Entry<ThriftTransportKey,Long> entry =;
              long delta = System.currentTimeMillis() - entry.getValue();
              if (delta >= STUCK_THRESHOLD) {
          // close connections outside of sync block
          for (CachedConnection cachedConnection : connectionsToClose) {

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.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

View raw message