cryptoe commented on PR #18254:
URL: https://github.com/apache/druid/pull/18254#issuecomment-3089898573

   @gianm Was able to clean up the interfaces a bit. 
   
   Now made the failure handler smarter : 
   
   ```
       return (failedTask, fault) -> {
         throwIfNonRetriableFault(fault);
         if (Thread.currentThread().getId() == mainThreadId.get()) {
           // this is called from the main controller thread, so we can 
directly access the kernel.
           addToRetryQueue(controllerQueryKernel, failedTask.getWorkerNumber(), 
fault);
         } else {
           // since this is called from the task launcher thread, we need to 
add it to the kernel manipulation queue so that only the controller thread can 
manipulate the kernel.
           addToKernelManipulationQueue(kernel -> {
             addToRetryQueue(kernel, failedTask.getWorkerNumber(), fault);
           });
         }
       };
       ```


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