Skip to content

Commit 4ac2f6f

Browse files
alanpaxtonadamretter
authored andcommitted
[bugfix] Avoid 2nd potential XQuery trigger leak
We may leak trigger states to thread local which can potentially occur when the specified XQueryTrigger library module is not available in the database Closes #5459
1 parent 003128b commit 4ac2f6f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

exist-core/src/main/java/org/exist/collections/triggers/XQueryTrigger.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ private void execute(final TriggerPhase phase, final TriggerEvent event, final D
411411
compiledQuery = getScript(broker, transaction);
412412
if (compiledQuery == null) {
413413
// NOTE: can occur if there is no such XQueryTrigger library module available in the database
414+
TriggerStatePerThread.clearIfFinished(phase);
414415
return;
415416
}
416417
} catch (final TriggerException e) {

0 commit comments

Comments
 (0)