kfaraz commented on code in PR #17834:
URL: https://github.com/apache/druid/pull/17834#discussion_r2022405717
##########
indexing-service/src/main/java/org/apache/druid/indexing/compact/CompactionScheduler.java:
##########
@@ -44,24 +44,46 @@
*/
public interface CompactionScheduler
{
- void start();
+ void becomeLeader();
- void stop();
+ void stopBeingLeader();
Review Comment:
Oh, the problem is that `becomeLeader()` and `stopBeingLeader()` don't
exactly start or stop the scheduler anymore. They just notify the scheduler
that something has changed i.e. leadership.
In fact, `stopBeingLeader()` just sets a flag and returns. The scheduled job
handles the change and stops scheduling further jobs.
Also, there are now two separate methods `start()` and `stop()` which are
associated with lifecycle start and stop.
--
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]