mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 12:20:38 +00:00
index: Delete old coinstats index directory on startup #36292
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36292
Loading…
Reference in a new issue
No description provided.
Delete branch "2026-09-coinstats-b-gone"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
coinstatsindexwas updated in an incompatible way in v30 (see #30469) and moved to theindexes/coinstatsindexfolder. The oldindexes/coinstatsdirectory was kept and a warning was logged so users could still downgrade to v29 without resyncing the index.There was a TODO in the code that scheduled the deletion for v31. Since v32 branch-off has happened, this would now ship in v33. By then 29.x should be EOL assuming we are not going to release a v29.5.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.Conflicts
No conflicts as of last run.
Concept ACK
ACK
82e4cc6964Shouldn't deletion of the old one be done after the creation of the new one that potentially did not yet occur?
The new one shouldn't need to have the old one to be created, but that 'feels' risky?
This isn't a concern. The new index doesn't use the old version at all. It is incompatible and has been synced from scratch since v30, so the old data is never read from there and so the order doesn't matter.
Earlier concerns remain unresolved; see the Run archive linked from the Review report.
🟠 Minor · Cleanup deletes the legacy index before a pruned upgrade can succeed
For direct v29 upgrades with
-coinstatsindexand pruned history, cleanup removes the downgrade fallback before the empty replacement index hits its pre-existing startup failure.Location:
src/index/coinstatsindex.cpp:98(head).🔵 Suggestion · Cleanup warnings discard the failing step and filesystem error
When legacy-index cleanup fails, the single warning hides the failing step and discards
fs::remove's error, making persistent cleanup failures harder to diagnose.Location:
src/index/coinstatsindex.cpp:101(head).🔵 Suggestion · Cleanup tests omit the nonempty-directory failure path
The updated functional test covers only successful deletion, so it would miss startup failures or deletion of unrelated files that occur only when cleanup encounters a nonempty legacy directory.
Location:
test/functional/feature_coinstatsindex_compatibility.py:53(head).🔵 Suggestion · Cleanup coverage unnecessarily depends on a previous-release binary
The cleanup assertion requires v28.2 despite being independent of legacy records; previous-releases CI includes it, but current-only test runs skip it.
Location:
test/functional/feature_coinstatsindex_compatibility.py:55(head).Review coverage was incomplete.
Reviewed:
847a312ea5e4· Review report · Previous reportspermalink
🐙 This pull request conflicts with the target branch and needs rebase.
Rebased
Done