somandal opened a new pull request, #16613:
URL: https://github.com/apache/pinot/pull/16613

   Today the `BasePeriodicTask` has it's `stop()` and `start()` methods marked 
as `synchronized`. Some of the periodic tasks call `synchronized` methods under 
`processTables`/`processTable` calls. The main purpose behind this task level 
synchronization is to prevent scheduled tasks and tasks that are submitted 
ad-hoc from contending with each other. For such tasks, during controller 
shutdown we've seen scenarios where if a controller periodic task is long 
running, the synchronized `stop()` gets blocked on getting the lock, delaying 
the controller shutdown phase.
   
   To address this, this PR adds a separate `_taskLock` object which can be 
used in methods like `processTables`/`processTable` to serve the purpose of 
ensuring that multiple tasks don't run at the same time. Using a separate lock 
prevents the long wait on shutdown to get the synchronized `stop()` lock.
   
   cc @Jackie-Jiang @xiangfu0 


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