abhishekrb19 commented on code in PR #18543:
URL: https://github.com/apache/druid/pull/18543#discussion_r2396445178


##########
processing/src/main/java/org/apache/druid/frame/processor/Bouncer.java:
##########
@@ -89,24 +89,16 @@ public int getMaxCount()
 
   public ListenableFuture<Ticket> ticket()
   {
-    // Acquire parent ticket first, if there's a parent.
-    if (parentBouncer != null) {
-      return FutureUtils.transformAsync(parentBouncer.ticket(), 
this::ticketInternal);
-    } else {
-      return ticketInternal(null);
-    }
-  }
-
-  /**
-   * Acquire a ticket from this Bouncer. Precondition: if there is a 
parentBouncer, only call this method when
-   * holding a parent ticket.
-   */
-  private ListenableFuture<Ticket> ticketInternal(@Nullable final Ticket 
parentTicket)
-  {
+    // Acquire our ticket first, then acquire a parent ticket. Only return our 
ticket once the parent ticket
+    // is also acquired.

Review Comment:
   IMO this could be called out in the method’s javadoc or at the class-level 
javadoc. I understood the behavior better after looking at the test code.



-- 
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