[stable2606] Backport #12106#12678
Open
paritytech-release-backport-bot[bot] wants to merge 1 commit into
Open
Conversation
…2106) Fix a kvdb refcount-leak: multiple `Store`/`Reference`/`Release` ops on the same key in one `sp_database::Transaction` each read a stale on-disk counter and write back to the same counter key — the underlying `DBTransaction` keeps only the last `put`, collapsing N ops to a single ±1. `commit_impl` now aggregates per-`(col, key)` deltas first and performs one read-modify-write per unique key. Surfaces when multiple displaced fork branches at the same height carry the same indexed extrinsics. `prune_displaced_branches` then issues `release(col11, hash) × N` per fork **in one finalization commit** — pre-fix only one decrement landed, leaving indexed transaction data reachable past its retention period. Adds parametrized tests across `KvdbMemdb` / `ParityDb` / `RocksDb` covering same-commit `Store + 2× Release`, `Store + 2× Reference`, and `Store + Release` net-zero patterns. All three failed on the kvdb backends pre-fix; all pass post-fix. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Branislav Kontur <bkontur@gmail.com> Co-authored-by: Bastian Köcher <git@kchr.de> (cherry picked from commit 91d93d4)
Contributor
|
This pull request is amending an existing release. Please proceed with extreme caution,
Emergency Bypass
If you really need to bypass this check: add |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #12106 into
stable2606from karolk91.See the documentation on how to use this bot.