DataNodeId removeConnection(String connectionId) {
    HostPortPoolManager hostPortPoolManager = connectionIdToPoolManager.remove(connectionId);
    if (hostPortPoolManager == null) {
      throw new IllegalArgumentException("Invalid connection id passed in");
    }
    DataNodeId dataNodeId = hostPortPoolManager.removeConnection(connectionId);
    totalManagedConnectionsCount--;
    if (!hostPortPoolManager.hasMinActiveConnections()) {
      poolManagersBelowMinActiveConnections.add(hostPortPoolManager);
    }
    return dataNodeId;
  }
Remove and stop tracking the given connection id.
@param connectionId connection to remove.
@throws {@link IllegalArgumentException} if the passed in connection id is invalid.
@return {@link DataNodeId} associated with this connection.
ambry-network/src/main/java/com/github/ambry/network/ConnectionTracker.java