Skip to content

Commit

Permalink
Merge pull request #5482 from evolvedbinary/5.x.x/hotfix/xquery-trigg…
Browse files Browse the repository at this point in the history
…er-leak

 [5.x.x] Fix an issue where XQuery Trigger state may leak
  • Loading branch information
dizzzz authored Oct 10, 2024
2 parents a2f66e8 + 9e2d613 commit e7e3cbf
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ private void execute(final TriggerPhase phase, final TriggerEvent event, final D
compiledQuery = getScript(broker, transaction);
if (compiledQuery == null) {
// NOTE: can occur if there is no such XQueryTrigger library module available in the database
TriggerStatePerThread.clearIfFinished(phase);
return;
}
} catch (final TriggerException e) {
Expand Down Expand Up @@ -447,6 +448,7 @@ private void execute(final TriggerPhase phase, final TriggerEvent event, final D
if (LOG.isDebugEnabled()) {
LOG.debug("No such function '" + functionName + "' in XQueryTrigger: " + compiledQuery.getSource());
}
TriggerStatePerThread.clearIfFinished(phase);
return;
}
}
Expand Down

0 comments on commit e7e3cbf

Please sign in to comment.