Skip to content

fix(posting): mark removed split parts for reclamation - #9825

Open
KeisukeYamashita wants to merge 1 commit into
dgraph-io:mainfrom
KeisukeYamashita:codex/fix-orphan-split-cleanup-9824
Open

fix(posting): mark removed split parts for reclamation#9825
KeisukeYamashita wants to merge 1 commit into
dgraph-io:mainfrom
KeisukeYamashita:codex/fix-orphan-split-cleanup-9824

Conversation

@KeisukeYamashita

@KeisukeYamashita KeisukeYamashita commented Sep 4, 2026

Copy link
Copy Markdown

Refs #9824

Description

Write BitEmptyPosting records for split parts removed during rollup, allowing Badger compaction to reclaim their old payloads.

Use the replacement parent's timestamp, including the +1 for finite read timestamps, to preserve historical reads.

Add regression tests covering:

  • Partial and whole-list deletion for data, reverse, and index keys.
  • Splits created through normal mutations and rollup.
  • Historical reads, timestamp boundaries, reinsertion, delayed rollup writes, database reopen, and backup conversion.

Validation: the posting test suite, targeted race tests (three runs), targeted debug tests, and Dgraph build pass. Trunk has not yet been run.

This change does not remove empty-key metadata or retroactively clean up already-orphaned parts.

Checklist

  • The PR title follows the Conventional Commits syntax.
  • Code compiles correctly and linting (via trunk) passes locally.
  • Regression tests added for the bug fix.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@KeisukeYamashita
KeisukeYamashita requested a review from a team as a code owner September 4, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant