db/kv/membatchwithdb: DupSort overlay cursor ignores whole-key deletions

Open
#26,467 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@yperbasis is already working on this.

Since Nov 17, 2026.

Assessment

This issue has not been assessed yet.

Description

A DupSort overlay cursor ignores whole-key deletions, so it still returns backing values of a deleted key.

  • Case: a key with values in a DupSort table of the backing tx; batch.Delete(table, key), then a fresh overlay cursor's SeekExact(key).
  • Delete records an entries marker, but memoryMutationCursor.isEntryDeleted checks only dups when the table is pure DupSort.
  • RangeDupSort checks the whole-key marker, so the read APIs disagree; DeleteCurrentDuplicates goes through Delete and has the same result.
  • Direction: check the whole-key marker for every table, then the value marker for DupSort.

Present on main; found reviewing #26444.

Dominant language
Go
Stars
3.6k
Forks
1.6k
Avg merge
1d 17h
Merged PRs (30d)
820

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from erigontech/erigon

All issues in erigontech/erigon

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.