Repository navigation
Conversation
Preserve caller transactions during cancellation. Keep worker cleanup in its execution path. Cover direct and failed cancellation with real tests. Document transaction ownership and fix the fixture.
This was referenced Oct 14, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3340 +/- ##
============================================
+ Coverage 54.31% 57.01% +2.70%
+ Complexity 2250 499 -1751
============================================
Files 770 514 -256
Lines 67952 49740 -18212
Branches 9213 7206 -2007
============================================
- Hits 36905 28360 -8545
+ Misses 27470 18480 -8990
+ Partials 3577 2900 -677 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of the PR
Cancelling a task can close the caller thread's existing graph transaction and discard unrelated, uncommitted graph changes. The default completion callback can do the same when cancellation invokes it on the caller thread.
This independently fixes the caller transaction issue tracked in the loading-mode review.
Main Changes
Preserve an existing caller transaction during Standard and Distributed scheduler cancellation, and let cancelled tasks leave worker cleanup to their execution path. Keep normal worker completion and task ownership fencing in place.
Before: write uncommitted data → cancel another task → that data is rolled back.
After: write uncommitted data → cancel another task → the caller can still commit or roll back its own data.
Document transaction ownership in
docs/server-runtime.md. Update the missing-retry test fixture to provide the transaction interface that cancellation now inspects.Verifying these changes
Does this PR potentially affect the following parts?
Documentation Status
Doc - TODO: required documentation is pending; complete it before merging.Doc - Done: documentation is included here or linked below.Doc - No Need: no user-visible documentation is affected.Documentation files in this PR or paired hugegraph-doc PR:
docs/server-runtime.md.Paired source PR: hugegraph#311