mirror of https://github.com/apache/lucene.git
SOLR-10643: Unset hasPendingActions flag after all actions have been run
This commit is contained in:
parent
1f3f50745a
commit
607184c47e
|
@ -120,18 +120,20 @@ public class ScheduledTriggers implements Closeable {
|
||||||
if (actions != null) {
|
if (actions != null) {
|
||||||
actionExecutor.submit(() -> {
|
actionExecutor.submit(() -> {
|
||||||
assert hasPendingActions.get();
|
assert hasPendingActions.get();
|
||||||
// let the action executor thread wait instead of the trigger thread so we use the throttle here
|
try {
|
||||||
actionThrottle.minimumWaitBetweenActions();
|
// let the action executor thread wait instead of the trigger thread so we use the throttle here
|
||||||
actionThrottle.markAttemptingAction();
|
actionThrottle.minimumWaitBetweenActions();
|
||||||
for (TriggerAction action : actions) {
|
actionThrottle.markAttemptingAction();
|
||||||
try {
|
for (TriggerAction action : actions) {
|
||||||
action.process(event);
|
try {
|
||||||
} catch (Exception e) {
|
action.process(event);
|
||||||
log.error("Error executing action: " + action.getName() + " for trigger event: " + event, e);
|
} catch (Exception e) {
|
||||||
throw e;
|
log.error("Error executing action: " + action.getName() + " for trigger event: " + event, e);
|
||||||
} finally {
|
throw e;
|
||||||
hasPendingActions.set(false);
|
}
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
hasPendingActions.set(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue