Permalink
Browse files

Minor tweak to reduce INFO logging for KeyedResourcePool::attemptGrow

  • Loading branch information...
1 parent 515b139 commit 7b8d30ca89aa7f6a2045fe6044647669bb352145 @jayjwylie jayjwylie committed Nov 13, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/java/voldemort/utils/pool/KeyedResourcePool.java
@@ -448,17 +448,21 @@ public Pool(ResourcePoolConfig resourcePoolConfig) {
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

0 comments on commit 7b8d30c

Please sign in to comment.