From fd9a0ea1390adb5f1816c7deb0fb8d2dcdffcb51 Mon Sep 17 00:00:00 2001 From: Jolyon Date: Thu, 3 Feb 2022 11:58:32 +0000 Subject: [PATCH] Add some javadoc around the shutdown pooling code (#5885) --- .../atlasdb/keyvalue/cassandra/pool/CassandraService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/atlasdb-cassandra/src/main/java/com/palantir/atlasdb/keyvalue/cassandra/pool/CassandraService.java b/atlasdb-cassandra/src/main/java/com/palantir/atlasdb/keyvalue/cassandra/pool/CassandraService.java index 753bcba087e..ff3aa5d6fff 100644 --- a/atlasdb-cassandra/src/main/java/com/palantir/atlasdb/keyvalue/cassandra/pool/CassandraService.java +++ b/atlasdb-cassandra/src/main/java/com/palantir/atlasdb/keyvalue/cassandra/pool/CassandraService.java @@ -397,6 +397,11 @@ public void addPool(InetSocketAddress server) { new CassandraClientPoolingContainer(metricsManager, server, config, currentPoolNumber, poolMetrics)); } + /** + * Removes the pool from the set of current pools. Note that this shuts down all idle connections, but active ones + * remain alive until they are returned to the pool, whereby they are destroyed immediately. Threads waiting on the + * pool will be interrupted. + */ public void removePool(InetSocketAddress removedServerAddress) { blacklist.remove(removedServerAddress); CassandraClientPoolingContainer removedContainer = currentPools.remove(removedServerAddress);