perf: remove engine runtime reference counter - #939
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughEngine shutdown now relies on packed admission state, session operation and observer blockers, and mandatory-runtime permits. ChangesLifecycle accounting and shutdown
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Engine
participant SessionRegistry
participant SessionState
participant MandatoryRuntime
participant Components
Engine->>SessionRegistry: inspect shutdown blockers
SessionRegistry->>SessionState: classify active operation or observer
SessionState-->>Engine: return blocker state and cleanup details
Engine->>MandatoryRuntime: wait for accepted cleanup permits
MandatoryRuntime-->>Engine: report drained cleanup admission
Engine->>Components: perform reverse-order teardown
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | -30 |
| Duplication | -14 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #939 +/- ##
==========================================
+ Coverage 93.37% 93.41% +0.03%
==========================================
Files 149 149
Lines 126753 126873 +120
==========================================
+ Hits 118358 118514 +156
+ Misses 8395 8359 -36 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Greptile SummaryThe PR removes engine-global runtime-reference accounting and makes stable session operations, explicit observer counts, and mandatory-runtime permits authoritative for shutdown.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| doradb-storage/src/engine.rs | Removes runtime-reference and strong-count shutdown checks, relying on admissions, session blockers, and mandatory permits. |
| doradb-storage/src/session.rs | Adds synchronized observer accounting and retains closed session state until observers drain. |
| doradb-storage/src/trx/mod.rs | Updates cleanup-job ownership documentation to reflect mandatory internal admission as shutdown authority. |
| doradb-storage/src/trx/sys.rs | Clarifies abandoned-cleanup accounting without changing cleanup submission behavior. |
| doradb-storage/src/catalog/index.rs | Documents that accepted index DDL is covered by its stable operation and mandatory caller permit. |
Reviews (2): Last reviewed commit: "resolve task" | Re-trigger Greptile
Closes #937
Summary by CodeRabbit