autumnust commented on a change in pull request #2624: [GOBBLIN-760] Improve 
retrying behavior of throttling client, add more informative …
URL: https://github.com/apache/incubator-gobblin/pull/2624#discussion_r280011104
 
 

 ##########
 File path: 
gobblin-restli/gobblin-throttling-service/gobblin-throttling-service-client/src/main/java/org/apache/gobblin/util/limiter/BatchedPermitsRequester.java
 ##########
 @@ -364,10 +393,22 @@ public void onSuccess(Response<PermitAllocation> result) 
{
       }
     }
 
+    public long elapsedTime() {
+      return System.currentTimeMillis() - this.startTime;
+    }
+
+    public synchronized void clearCallback() {
 
 Review comment:
   Why this method is needed if there's only one on-the-fly request ( 
corresponding one callback) being existed ? Can't it be simply `clearSemaphore` 
instead of having a `callbackcleared` method for protection? 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to