Skip to content

fix(server): release traversal worker leases - #3314

Merged
imbajin merged 2 commits into
apache:masterfrom
hugegraph:fix/traverser-worker-leases
Oct 12, 2026
Merged

imbajin merged 2 commits into
apache:masterfrom
hugegraph:fix/traverser-worker-leases

Conversation

@imbajin

@imbajin imbajin commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Parallel traversals could leave a RocksDB worker session open after graph deletion, keeping files locked and preventing recreation at the same path. Bind the worker transaction before consuming lazy edge queries and release worker-owned transactions when consumers finish, including failure and early stop. Caller transactions remain intact.

The regressions cover real worker leases, actual capacity stops and caller transaction boundaries. A bounded Kneighbor traversal now checks that leases disappear, closes the graph while preserving its database, and immediately opens the original database and every column family with creation disabled.

Validation: the native regression fails with worker cleanup alone and passes with early transaction binding; removing the actual capacity-stop branch makes its dedicated regression fail. A separate small HTTP test verified Kneighbor results, graph deletion without remaining native handles, first same-path recreation and independent Unicode data readback. Java 17 formatting, clean reactor compilation, focused RocksDB tests and three independent reviews passed. The new source revision requires fresh CI.

Related release issue: SV10. This internal transaction lifecycle fix adds no API, configuration or dependency (Doc - No Need). The original shared-service handle residue, complete C04, authenticated and distributed release acceptance remain open.

Change diagram

Worker transaction binding and lease cleanup without closing caller transactions. This conceptual diagram does not replace the validation and scope notes above.
Worker transaction binding and lease cleanup without closing caller transactions

- bind worker transactions before consuming lazy edge queries
- release worker-owned backend leases on completion and failure
- cover RocksDB lease cleanup and caller transaction boundaries
@codecov

codecov Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.28%. Comparing base (cfc5c23) to head (6a3dfcd).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3314      +/-   ##
============================================
+ Coverage     52.24%   52.28%   +0.03%     
+ Complexity     2274     2272       -2     
============================================
  Files           762      762              
  Lines         67399    67400       +1     
  Branches       9138     9138              
============================================
+ Hits          35211    35238      +27     
+ Misses        28649    28622      -27     
- Partials       3539     3540       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- cover bounded Kneighbor traversal with real RocksDB
- reopen the original database with all column families
- verify the actual capacity stop preserves caller work
@imbajin
imbajin merged commit f7a0a79 into apache:master Oct 12, 2026
33 checks passed
@imbajin
imbajin deleted the fix/traverser-worker-leases branch October 12, 2026 09:10
imbajin added a commit that referenced this pull request Oct 12, 2026
An OLTP edge consumer could leave its active iterator open after failure, early stop or interruption. A full queue could also keep its producer blocked after the worker failed, and a later transaction cleanup failure could replace the original business error.

Close the owned iterator in finally, using the original input when preparation fails. Stop failed consumer queues so blocked producers can exit, propagate a normal stop so producers stop reading inputs, retain the first terminal error, and attach later cleanup failures as suppressed exceptions. Preserve the worker transaction binding and completion cleanup from #3314 while integrating current master and both native test registrations.
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.

2 participants