Skip to content

Conversation

@andrewazores
Copy link
Member

@andrewazores andrewazores commented Nov 17, 2025

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits using a GPG signature

To recreate commits with GPG signature git fetch upstream && git rebase --force --gpg-sign upstream/main


Fixes: #1154

Description of the change:

Use single threaded "activator" executor in RuleService to handle startup job of activating Rules against Targets, and then to process dispatch of ActivationAttempt queue. Activator only takes elements from queue and then fires an actual execution job to be processed on a "worker" pool, which uses virtual threads, rather than directly handling processing itself.

Motivation for the change:

Allows concurrent/parallel activation of Rules against targets. Prior to this change Rule activation would only happen serially, so if there are many discovered targets and if connections to each target are a bit slow, then Rule overall activation could take significant time. Importantly, if a discovered target is not connectable at all and would produce a connection timeout, performing these activations concurrently on different virtual threads rather than serially on a single thread allows the possible activations to take place without needing to wait for the impossible activations to time out.

How to manually test:

  1. Check out and build PR
  2. ./smoketest.bash -O -t quarkus-cryostat-agent,vertx-fib-demo
  3. Check that rule activation works as normal, but quicker than before.

@andrewazores andrewazores changed the title chore(rules): use worker pool to perform Rule execution perf(rules): use worker pool to perform Rule execution Nov 17, 2025
@github-actions
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

1 similar comment
@github-actions
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@andrewazores
Copy link
Member Author

/build_test

@github-actions
Copy link

Workflow started at 11/28/2025, 10:29:47 AM. View Actions Run.

@github-actions
Copy link

No OpenAPI schema changes detected.

@github-actions
Copy link

No GraphQL schema changes detected.

@github-actions
Copy link

CI build and push: All tests pass ✅
https://github.com/cryostatio/cryostat/actions/runs/19768049857

@andrewazores andrewazores merged commit 54d5340 into cryostatio:main Dec 2, 2025
12 checks passed
@andrewazores andrewazores deleted the rule-execute-worker branch December 2, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Automated Rule activation fires sequentially

2 participants