Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GOBBLIN-1872] Enable scheduler for non-leader in multi-active scheduler configuration #3736

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,9 @@ private void handleLeadershipChange(NotificationContext changeContext) {
LOGGER.info("Leader lost notification for {} HM.isLeader {}", this.helixManager.get().getInstanceName(),
this.helixManager.get().isLeader());

if (configuration.isSchedulerEnabled()) {
LOGGER.info("Gobblin Service is now running in slave instance mode, disabling Scheduler.");
if (configuration.isSchedulerEnabled() && !configuration.isMultiActiveSchedulerEnabled()) {
LOGGER.info("Gobblin Service is now running in non-leader mode without multi-active scheduler enabled, "
+ "disabling Scheduler.");
this.scheduler.setActive(false);
}

Expand Down Expand Up @@ -473,7 +474,12 @@ public void start() throws ApplicationException {

} else {
if (configuration.isSchedulerEnabled()) {
LOGGER.info("[Init] Gobblin Service is running in slave instance mode, not enabling Scheduler.");
if (configuration.isMultiActiveSchedulerEnabled()) {
LOGGER.info("[Init] Gobblin Service enabling scheduler for non-leader since multi-active scheduler enabled");
this.scheduler.setActive(true);
} else {
LOGGER.info("[Init] Gobblin Service is running in non-leader instance mode, not enabling Scheduler.");
}
}
if (helixLeaderGauges.isPresent()) {
helixLeaderGauges.get().setState(LeaderState.SLAVE);
Expand Down
Loading