Skip to content

Commit

Permalink
Fix Issue 2429 (#2432)
Browse files Browse the repository at this point in the history
* issue-2429 failover node exist also remove running node,prevent execute dead loop

* issue-2429 remove not useing code
  • Loading branch information
wjdxw authored Aug 25, 2024
1 parent 756de29 commit ca353c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public void onChange(final DataChangedEvent event) {
if (!failoverItems.isEmpty()) {
for (int each : failoverItems) {
failoverService.setCrashedFailoverFlagDirectly(each);
executionService.clearRunningInfo(Collections.singletonList(each));
failoverService.failoverIfNecessary();
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ void assertJobCrashedJobListenerWhenIsOtherFailoverInstanceCrashed() {
when(instanceNode.getInstanceFullPath()).thenReturn("/test_job/instances");
failoverListenerManager.new JobCrashedJobListener().onChange(new DataChangedEvent(Type.DELETED, "/test_job/instances/127.0.0.1@-@1", ""));
verify(failoverService).setCrashedFailoverFlagDirectly(1);
verify(executionService).clearRunningInfo(Collections.singletonList(1));
verify(failoverService).failoverIfNecessary();
JobRegistry.getInstance().shutdown("test_job");
}
Expand Down

0 comments on commit ca353c3

Please sign in to comment.