db/kv/membatchwithdb: surface DomainReader read errors instead of swallowing them - #22893
Merged
Conversation
…llowing them MemoryMutation and OverlayTemporalReadView GetAsOf/HistorySeek used `err == nil && ok` to gate the DomainReader result, so a reader error fell through to the committed tx and was hidden. Propagate the error; keep the ok-based committed fallback (a tombstone is ok=true, so it is not resurrected).
AskAlexSharov
approved these changes
Jul 31, 2026
This was referenced Aug 2, 2026
Merged
pull Bot
pushed a commit
to Dustin4444/erigon
that referenced
this pull request
Aug 3, 2026
…erlay (erigontech#22961) Port of the tests added in the release-branch backports erigontech#22951 (`release/3.5`) and erigontech#22960 (`release/3.6`). All three pass on `main` — both erigontech#22511 and erigontech#22893 are here — so they land as regression coverage. Each was written against the branch where its fix was missing and verified red there first: | Test | Verified red on | Without | |---|---|---| | `TestReceiptAsOf_InFlightBlockLogIndex` | `release/3.5` | erigontech#22511 — returns `0x7` instead of `0x3` | | `TestDomainReadErrorsPropagate` | `release/3.6` | erigontech#22893 — error swallowed, `but got nil` | | `TestGetReceiptLogIndexThroughOverlay` | `main` | the `WithTemporalOverlay` call in `GetReceipt` | The third one is the reason this is worth having on `main` regardless of the backports: `Filters.WithOverlay` / `WithTemporalOverlay` had **no test coverage anywhere in the tree**. Remove `tx = g.filters.WithTemporalOverlay(tx)` from `GetReceipt` and the bug reported on erigontech#22106 returns in production while CI stays green — verified, that test now fails. The other two also add coverage the upstream fixes did not ship: erigontech#22511's own test works at storage level with a synthetic key, so nothing exercised `LogIndexAfterTxKey` through `rawtemporaldb.ReceiptAsOf`; erigontech#22893 shipped with no test at all. One adaptation from the release branches: `AppendReceipt` is named `AppendReceiptMetadata` here.
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.
Independent correctness fix split out of #21414 (per the request to break it up). Stands alone on
main.MemoryMutationandOverlayTemporalReadViewGetAsOf/HistorySeekgated theDomainReaderresult witherr == nil && ok, so a reader error fell through to the committed tx and was silently hidden. This propagates the error and keeps theok-based committed fallback (a tombstone isok=true, so it is not resurrected).No dependency on the background-commit work; part of the split recorded on #21414.