Skip to content

db/kv/membatchwithdb: surface DomainReader read errors instead of swallowing them - #22893

Merged
AskAlexSharov merged 1 commit into
mainfrom
mh/overlay-membatch-read-fixes
Jul 31, 2026
Merged

db/kv/membatchwithdb: surface DomainReader read errors instead of swallowing them#22893
AskAlexSharov merged 1 commit into
mainfrom
mh/overlay-membatch-read-fixes

Conversation

@mh0lt

@mh0lt mh0lt commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Independent correctness fix split out of #21414 (per the request to break it up). Stands alone on main.

MemoryMutation and OverlayTemporalReadView GetAsOf/HistorySeek gated the DomainReader result with err == nil && ok, so a reader error fell through to the committed tx and was silently hidden. This propagates the error and keeps the ok-based committed fallback (a tombstone is ok=true, so it is not resurrected).

No dependency on the background-commit work; part of the split recorded on #21414.

…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
AskAlexSharov added this pull request to the merge queue Jul 31, 2026
Merged via the queue into main with commit 8324709 Jul 31, 2026
111 checks passed
@AskAlexSharov
AskAlexSharov deleted the mh/overlay-membatch-read-fixes branch July 31, 2026 03:32
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants