1 minor finding · 3 suggestions
Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.
Findings
[minor] · Cleanup deletes the legacy index before a pruned upgrade can succeed
For direct v29 upgrades with -coinstatsindex and 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).
Details and suggested fix
With a synced legacy database, no indexes/coinstatsindex and already-pruned history, Init() leaves the new index unsynced and GetSummary() reports genesis. StartIndexBackgroundSync() then fails the required block/undo availability check and shuts down, but the constructor has already destroyed the legacy database. The base revision leaves it intact after the same failure, allowing the operator to retain indexed functionality by downgrading. Run cleanup only after the replacement passes that check.
Losing the v29 downgrade path at EOL is intentional, and v30-v32 already required -reindex for this pruned upgrade. The additional cost is losing the usable fallback even when the upgrade fails: rebuilding either index requires a full -reindex and redownload. Disabling -coinstatsindex still restores ordinary node operation without that download. The release note does not explain this pruned-node cost. The number of users skipping v30-v32 is unknown.
Optional improvements
[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).
Details and suggested fix
An unrelated file inside db/ survives LevelDB's DestroyDB(), which ignores failure to remove the database directory. The subsequent nonrecursive fs::remove(old_path, ec) then fails because the parent remains nonempty, but the warning drops ec. A database lock or deletion failure produces the same warning because the wrapper reduces LevelDB's status to a boolean. Evaluate the two steps separately, identify the failed step, and include ec.message() for a filesystem removal error. Keep cleanup nonfatal; replacing it with recursive removal would also delete unrelated files and would not be a diagnostics-only change.
[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).
Details and suggested fix
The test copies a clean v28.2 database and checks the success message and directory disappearance. Add a case with a marker file at the root of indexes/coinstats: DestroyDB() can remove db/, but the remaining marker makes fs::remove(old_path, ec) fail deterministically. Assert the warning, preservation of the marker, and an unchanged gettxoutsetinfo('muhash') result. These assertions would distinguish the current best-effort behavior from a throwing removal overload or recursive deletion, both of which would still pass the clean fixture. After stopping the node and removing the marker, restart once more and assert successful cleanup to cover retry.
[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).
Details and suggested fix
Put the deletion-only check in feature_coinstatsindex.py, using a copy of a stopped current node's indexes/coinstatsindex/db at indexes/coinstats/db. DestroyDB() enumerates recognized filenames without deserializing records, so this exercises the same cleanup without an old binary. Keep the legacy-versus-current RPC comparison in the compatibility test. This makes cleanup coverage available to current-only builds and avoids tying its lifetime to a test whose docstring permits removal after v29 EOL; it does not address an absence of coverage in the existing previous-releases CI job.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: Name the release note file after the PR number (earlier report)