kfaraz commented on code in PR #12626:
URL: https://github.com/apache/druid/pull/12626#discussion_r894239632


##########
core/src/main/java/org/apache/druid/java/util/http/client/pool/ResourcePool.java:
##########
@@ -119,11 +119,17 @@ public V get()
         return value;
       }
 
+      @Override
+      public boolean isPresent()
+      {
+        return !returned.get();
+      }
+
       @Override
       public void returnResource()
       {
         if (returned.getAndSet(true)) {
-          log.warn(StringUtils.format("Resource at key[%s] was returned 
multiple times?", key));
+          log.warn("Resource at key[%s] was returned multiple times?", key);

Review Comment:
   I am little unclear on this. Isn't this log here to indicate that a resource 
which is taken once should only be returned once? If we always need to check 
`isPresent()` before calling `returnResource`, this warn log probably doesn't 
serve much purpose.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to