Skip to content

fix Work recalculate concurrency with cascade and fix rd work - #210

Merged
stalep merged 1 commit into
Hyperfoil:mainfrom
willr3:work_cascade
Jul 24, 2026
Merged

fix Work recalculate concurrency with cascade and fix rd work#210
stalep merged 1 commit into
Hyperfoil:mainfrom
willr3:work_cascade

Conversation

@willr3

@willr3 willr3 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

This introduces Work.cascade which prevents work from creating more work when it creates new Values. This option is used to recalculate ephemeral Values for recalculate without incurring the performance penalty of wasted additional computation for unnecessary nodes and sorting.
This also fixes recalculate to work concurrently with upload and other recalculates that could impact the same scope. The RecalculateWorkQueueTest uses a WorkExecutor without threads to manually verify the queuing.
This PR also removes recalculate for a full folder.

@stalep

stalep commented Jul 20, 2026

Copy link
Copy Markdown
Member

I haven't done a full review, but it looks very good and should close #171 if/when merged.

SPLIT("split"),
USER_INPUT("user");
EDIVISIVE("ed",true),
FINGERPRINT("fp",true),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why finger print node is marked as analysis node along with detection node? Asking since it is used for aggregating. Is it because detection nodes need them for grouping?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An analysis node is one that analyzes the output of other nodes and does not make a node ephemeral.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

far as I've checked setActiveNodes() is not called but should this also requires a clean up here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked setActiveNodes() is not called

Two things happened here. Work was previously a Panache Entity. Panache allows developers to write code that references public member variables and it will replace those references with getters and setters at compile time. This should have been fixed when Work was changed to a plain java object (POJO) but good catch that it wasn't performed. I fixed Work to no longer have public member variables and updated the PR.

also requires a clean up here?

When you say "clean up" it leaves me unsure of what you mean. I assume you mean that RelativeDifference should be removed from the check to make the Work cumulative and if so you're correct. I updated the method.

NodeEntity found = NodeEntity.findById(node.id);
found.operation = ".node + 1";
found.persist();
System.out.println("found="+found);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be proper asserts for the test?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The omg test was something I created to test while making code changes but was not meant to be included in the PR. I removed it

assertFalse(result.getOutput().contains("null")||result.getOutput().contains("NULL"),"list values should not contain null\n"+result.getOutput());
}

@Test

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a CLI test for per node re calculation?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this PR was to correct the functionality in how work is handled. Once this is merged we can explore if it needs to be exposed to users via a CLI or if it should trigger automatically when users perform related actions (e.g. adding or updating a node).

@willr3
willr3 force-pushed the work_cascade branch 3 times, most recently from e1d4b0f to 827e68e Compare July 23, 2026 13:37
Comment thread src/main/java/io/hyperfoil/tools/h5m/svc/WorkService.java Outdated
Comment thread src/main/java/io/hyperfoil/tools/h5m/svc/ProcessingService.java Outdated
@stalep
stalep merged commit 843f9f4 into Hyperfoil:main Jul 24, 2026
1 check passed
stalep added a commit to stalep/h5m that referenced this pull request Aug 3, 2026
Rebase aesh branch on origin/main. Update Quarkus version from
999-SNAPSHOT to 3.38.0 with aesh 3.16.4. Fix Vert.x Buffer import
changes (core → mutiny). Make CLI command fields package-private
to avoid reflective access warnings.

Convert remaining picocli commands to aesh: AddEDivisive,
ListProcessing, RemoveProcessing, ResumeProcessing. Create standalone
AddFingerprint command (replaces --fingerprint flag on AddJq/AddJs).

Fix test command syntax (node jq → node add jq). Remove outdated
null-value assertion for ephemeral-nullified intermediate nodes.

RecalculateCmd placeholder — folder-level recalculate API was removed
by PR Hyperfoil#210, needs reimplementation for CLI.

Detection test failures remain — fingerprint and fixedthreshold nodes
produce correct structure but detection values are not generated.
Requires investigation into work queue completion in REPL test context.
stalep added a commit to stalep/h5m that referenced this pull request Aug 5, 2026
Rebase aesh branch on origin/main. Update Quarkus version from
999-SNAPSHOT to 3.38.0 with aesh 3.16.4. Fix Vert.x Buffer import
changes (core → mutiny). Make CLI command fields package-private
to avoid reflective access warnings.

Convert remaining picocli commands to aesh: AddEDivisive,
ListProcessing, RemoveProcessing, ResumeProcessing. Create standalone
AddFingerprint command (replaces --fingerprint flag on AddJq/AddJs).

Fix test command syntax (node jq → node add jq). Remove outdated
null-value assertion for ephemeral-nullified intermediate nodes.

RecalculateCmd placeholder — folder-level recalculate API was removed
by PR Hyperfoil#210, needs reimplementation for CLI.

Detection test failures remain — fingerprint and fixedthreshold nodes
produce correct structure but detection values are not generated.
Requires investigation into work queue completion in REPL test context.
stalep added a commit to stalep/h5m that referenced this pull request Aug 6, 2026
Rebase aesh branch on origin/main. Update Quarkus version from
999-SNAPSHOT to 3.38.0 with aesh 3.16.4. Fix Vert.x Buffer import
changes (core → mutiny). Make CLI command fields package-private
to avoid reflective access warnings.

Convert remaining picocli commands to aesh: AddEDivisive,
ListProcessing, RemoveProcessing, ResumeProcessing. Create standalone
AddFingerprint command (replaces --fingerprint flag on AddJq/AddJs).

Fix test command syntax (node jq → node add jq). Remove outdated
null-value assertion for ephemeral-nullified intermediate nodes.

RecalculateCmd placeholder — folder-level recalculate API was removed
by PR Hyperfoil#210, needs reimplementation for CLI.

Detection test failures remain — fingerprint and fixedthreshold nodes
produce correct structure but detection values are not generated.
Requires investigation into work queue completion in REPL test context.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants