Skip to content

fix(dash-spv): run the storage worker only between start and stop or drop - #1183

Merged
xdustinface merged 1 commit into
devfrom
fix/spv-storage-worker-lifecycle
Oct 19, 2026
Merged

xdustinface merged 1 commit into
devfrom
fix/spv-storage-worker-lifecycle

Conversation

@ZocoLini

@ZocoLini ZocoLini commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

DiskStorageManager::new started the background persistence worker, and only stop and clear aborted it, with no Drop. A manager dropped without stop (e.g. one passed to a DashSpvClient that never ran) left the task alive: it kept the storages and kept writing to the directory, even after another manager had opened it.

  • new no longer starts the worker; it runs from start (which DashSpvClient::run already calls).
  • Dropping the manager aborts the worker. stop is still what persists.

Platform's workaround of calling stop right after new becomes unnecessary.

Closes #1162

🤖 Generated with Claude Code

PR Hygiene · 61a0c02

  • Bots — coderabbitai skipped after its own rate limit
  • Self-review — post /self-reviewed
  • Build green
  • Approvals
    • dash-spv (dash-spv/src/storage/mod.rs) — QuantumExplorer or xdustinface

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

…drop

`DiskStorageManager::new` started the background persistence worker, and only
`stop` and `clear` aborted it. A manager dropped without `stop` left the task
alive, holding the storages and writing to the directory. The worker now
starts only from `start`, and dropping the manager aborts it.

Closes #1162

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: dashpay/rust-dashcore/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9baa3a58-894e-4772-8a4e-219fd0be34a0
📥 Commits

Reviewing files that changed from the base of the PR and between 80298d0 and 61a0c02.

📒 Files selected for processing: 1
  • dash-spv/src/storage/mod.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.85%. Comparing base (80298d0) to head (61a0c02).
⚠️ Report is 3 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1183      +/-   ##
==========================================
- Coverage   78.87%   78.85%   -0.03%     
==========================================
  Files         304      304              
  Lines       81405    81414       +9     
==========================================
- Hits        64206    64196      -10     
- Misses      17199    17218      +19     
Flag Coverage Δ
core 77.59% <ø> (ø)
ffi 50.72% <ø> (-0.07%) ⬇️
rpc 52.05% <ø> (ø)
spv 92.73% <100.00%> (-0.05%) ⬇️
wallet 82.19% <ø> (ø)
Files with missing lines Coverage Δ
dash-spv/src/storage/mod.rs 89.11% <100.00%> (-0.01%) ⬇️

... and 8 files with indirect coverage changes

@ZocoLini
ZocoLini marked this pull request as ready for review October 16, 2026 14:02
@github-actions

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. labels Oct 16, 2026
@ZocoLini
ZocoLini requested a review from xdustinface October 17, 2026 17:03
@xdustinface
xdustinface merged commit 280b3f2 into dev Oct 19, 2026
87 of 91 checks passed
@xdustinface
xdustinface deleted the fix/spv-storage-worker-lifecycle branch October 19, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. waiting-self-review Waiting for the author to post /self-reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dash-spv: the storage worker outlives a DiskStorageManager that is never stopped

2 participants