From 7b8d30ca89aa7f6a2045fe6044647669bb352145 Mon Sep 17 00:00:00 2001 From: Jay J Wylie Date: Mon, 12 Nov 2012 20:54:11 -0800 Subject: [PATCH] Minor tweak to reduce INFO logging for KeyedResourcePool::attemptGrow --- src/java/voldemort/utils/pool/KeyedResourcePool.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/java/voldemort/utils/pool/KeyedResourcePool.java b/src/java/voldemort/utils/pool/KeyedResourcePool.java index ec90959353..2ee7f30b5f 100644 --- a/src/java/voldemort/utils/pool/KeyedResourcePool.java +++ b/src/java/voldemort/utils/pool/KeyedResourcePool.java @@ -448,17 +448,21 @@ public boolean attemptGrow(K key, ResourceFactory objectFactory) throw if(!nonBlockingPut(resource)) { this.size.decrementAndGet(); objectFactory.destroy(key, resource); + if (currentCreatesInFlight>0) { logger.info("attemptGrow established new connection for key " + key.toString() + " with " + currentCreatesInFlight + " other connection establishments in flight." + " And then promptly destroyed the new connection."); + } return false; } + if (currentCreatesInFlight>0) { logger.info("attemptGrow established new connection for key " + key.toString() + " with " + currentCreatesInFlight + " other connection establishments in flight." + " After checking in to KeyedResourcePool, there are " + queue.size() + " destinations checked in."); + } } } catch(Exception e) { // If nonBlockingPut throws an exception, then we could leak