Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-3574

preferCachedConnections=false is not respected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.6.1
    • 1.5.3, 1.6.3, 1.7.0
    • rpc
    • None

    Description

        Pair<String,TTransport> getAnyTransport(List<ThriftTransportKey> servers, boolean preferCachedConnection) throws TTransportException {
          ....
          if (!preferCachedConnection) {
            synchronized (this) {
              List<CachedConnection> cachedConnList = getCache().get(ttk);
              if (cachedConnList != null) {
                for (CachedConnection cachedConnection : cachedConnList) {
                  if (!cachedConnection.isReserved()) {
                    cachedConnection.setReserved(true);
                    final String serverAddr = ttk.getServer().toString();
                    log.trace("Using existing connection to {} timeout {}", serverAddr, ttk.getTimeout());
                    return new Pair<String,TTransport>(serverAddr, cachedConnection.transport);
                  }
                }
              }
            }
          }
      

      It appears that ThriftTransportPool.getAnyTransport is returning a cache connection when the caller requested that a new connection is returned instead of a cached one.

      Attachments

        Issue Links

          Activity

            People

              elserj Josh Elser
              elserj Josh Elser
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h