Skip to content

Commit

Permalink
fix(rules): rule application occurs within DB transaction to ensure c…
Browse files Browse the repository at this point in the history
…ursor is not closed prematurely
  • Loading branch information
andrewazores committed Jan 18, 2024
1 parent 997f141 commit 9155c4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/io/cryostat/rules/RuleService.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ private IConstrainedMap<String> createRecordingOptions(Rule rule, JFRConnection
return optionsBuilder.build();
}

private void applyRuleToMatchingTargets(Rule rule) {
@Transactional
void applyRuleToMatchingTargets(Rule rule) {
try (Stream<Target> targets = Target.streamAll()) {
targets.filter(
target -> {
Expand Down

0 comments on commit 9155c4b

Please sign in to comment.