Skip to content

Compactions discard values in dropped blob files (#15645) - #15645

Closed
mikechuangmeta wants to merge 1 commit into
meta:mainfrom
mikechuangmeta:export-D131013279
Closed

mikechuangmeta wants to merge 1 commit into
meta:mainfrom
mikechuangmeta:export-D131013279

Conversation

@mikechuangmeta

@mikechuangmeta mikechuangmeta commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Changes

  • Every compaction, automatic or manual, whose inputs may reference a blob
    file recorded by best_efforts_blob_db_repair runs
    MissingBlobRepairIterator in a new mode limited to recorded blob files.
    Lost values become deletions at their sequence number; wide entities keep
    surviving columns.
  • These compactions run locally and skip garbage for recorded blob files.
    Unrecorded missing blob files still fail with Corruption.

Why?

  • After D131013277 records a dropped blob file, a compaction that drops one of
    its values still fails: garbage for a blob file absent from the Version is
    rejected ("unknown blob file"), and blob GC, filters and merges read the
    missing payload. Reusing the CompactRangeOptions repair from D128836898
    lets compactions proceed and removes the dangling references over time.

Changes visible to existing users

  • None while no dropped blob files are recorded: each compaction adds an O(1)
    check of its input Version's empty dropped set.

Design doc

Reviewed By: xingbowang

Differential Revision: D131013279

@meta-codesync

meta-codesync Bot commented Nov 11, 2026

Copy link
Copy Markdown

@mikechuangmeta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D131013279.

mikechuangmeta added a commit to mikechuangmeta/rocksdb that referenced this pull request Nov 11, 2026
Summary:
Pull Request resolved: meta#15645

Changes
- Every compaction, automatic or manual, whose inputs may reference a blob
  file recorded by `best_efforts_blob_db_repair` runs
  `MissingBlobRepairIterator` in a new mode limited to recorded blob files.
  Lost values become deletions at their sequence number; wide entities keep
  surviving columns.
- These compactions run locally and skip garbage for recorded blob files.
  Unrecorded missing blob files still fail with Corruption.

Why?
- After D131013277 records a dropped blob file, a compaction that drops one of
  its values still fails: garbage for a blob file absent from the Version is
  rejected ("unknown blob file"), and blob GC, filters and merges read the
  missing payload. Reusing the `CompactRangeOptions` repair from D128836898
  lets compactions proceed and removes the dangling references over time.

Changes visible to existing users
- None while no dropped blob files are recorded: each compaction adds an O(1)
  check of its input Version's empty dropped set.

Design doc
- https://mdoc.internalmeta.com/doc/ffcd44f2-3147-4ced-aee4-c5623ccd6d8e

Reviewed By: xingbowang

Differential Revision: D131013279
@meta-codesync meta-codesync Bot changed the title Compactions discard values in dropped blob files Compactions discard values in dropped blob files (#15645) Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

✅ clang-tidy: No findings on changed lines

Completed in 600.1s.

mikechuangmeta added a commit to mikechuangmeta/rocksdb that referenced this pull request Nov 11, 2026
Summary:
Pull Request resolved: meta#15645

Changes
- Every compaction, automatic or manual, whose inputs may reference a blob
  file recorded by `best_efforts_blob_db_repair` runs
  `MissingBlobRepairIterator` in a new mode limited to recorded blob files.
  Lost values become deletions at their sequence number; wide entities keep
  surviving columns.
- These compactions run locally and skip garbage for recorded blob files.
  Unrecorded missing blob files still fail with Corruption.

Why?
- After D131013277 records a dropped blob file, a compaction that drops one of
  its values still fails: garbage for a blob file absent from the Version is
  rejected ("unknown blob file"), and blob GC, filters and merges read the
  missing payload. Reusing the `CompactRangeOptions` repair from D128836898
  lets compactions proceed and removes the dangling references over time.

Changes visible to existing users
- None while no dropped blob files are recorded: each compaction adds an O(1)
  check of its input Version's empty dropped set.

Design doc
- https://mdoc.internalmeta.com/doc/ffcd44f2-3147-4ced-aee4-c5623ccd6d8e

Reviewed By: xingbowang

Differential Revision: D131013279
mikechuangmeta added a commit to mikechuangmeta/rocksdb that referenced this pull request Nov 11, 2026
Summary:

Changes
- Every compaction, automatic or manual, whose inputs may reference a blob
  file recorded by `best_efforts_blob_db_repair` runs
  `MissingBlobRepairIterator` in a new mode limited to recorded blob files.
  Lost values become deletions at their sequence number; wide entities keep
  surviving columns.
- These compactions run locally and skip garbage for recorded blob files.
  Unrecorded missing blob files still fail with Corruption.

Why?
- After D131013277 records a dropped blob file, a compaction that drops one of
  its values still fails: garbage for a blob file absent from the Version is
  rejected ("unknown blob file"), and blob GC, filters and merges read the
  missing payload. Reusing the `CompactRangeOptions` repair from D128836898
  lets compactions proceed and removes the dangling references over time.

Changes visible to existing users
- None while no dropped blob files are recorded: each compaction adds an O(1)
  check of its input Version's empty dropped set.

Design doc
- https://mdoc.internalmeta.com/doc/ffcd44f2-3147-4ced-aee4-c5623ccd6d8e

Reviewed By: xingbowang

Differential Revision: D131013279
mikechuangmeta added a commit to mikechuangmeta/rocksdb that referenced this pull request Nov 11, 2026
Summary:

Changes
- Every compaction, automatic or manual, whose inputs may reference a blob
  file recorded by `best_efforts_blob_db_repair` runs
  `MissingBlobRepairIterator` in a new mode limited to recorded blob files.
  Lost values become deletions at their sequence number; wide entities keep
  surviving columns.
- These compactions run locally and skip garbage for recorded blob files.
  Unrecorded missing blob files still fail with Corruption.

Why?
- After D131013277 records a dropped blob file, a compaction that drops one of
  its values still fails: garbage for a blob file absent from the Version is
  rejected ("unknown blob file"), and blob GC, filters and merges read the
  missing payload. Reusing the `CompactRangeOptions` repair from D128836898
  lets compactions proceed and removes the dangling references over time.

Changes visible to existing users
- None while no dropped blob files are recorded: each compaction adds an O(1)
  check of its input Version's empty dropped set.

Design doc
- https://mdoc.internalmeta.com/doc/ffcd44f2-3147-4ced-aee4-c5623ccd6d8e

Reviewed By: xingbowang

Differential Revision: D131013279
Summary:

Changes
- Every compaction, automatic or manual, whose inputs may reference a blob
  file recorded by `best_efforts_blob_db_repair` runs
  `MissingBlobRepairIterator` in a new mode limited to recorded blob files.
  Lost values become deletions at their sequence number; wide entities keep
  surviving columns.
- These compactions run locally and skip garbage for recorded blob files.
  Unrecorded missing blob files still fail with Corruption.

Why?
- After D131013277 records a dropped blob file, a compaction that drops one of
  its values still fails: garbage for a blob file absent from the Version is
  rejected ("unknown blob file"), and blob GC, filters and merges read the
  missing payload. Reusing the `CompactRangeOptions` repair from D128836898
  lets compactions proceed and removes the dangling references over time.

Changes visible to existing users
- None while no dropped blob files are recorded: each compaction adds an O(1)
  check of its input Version's empty dropped set.

Design doc
- https://mdoc.internalmeta.com/doc/ffcd44f2-3147-4ced-aee4-c5623ccd6d8e

Reviewed By: xingbowang

Differential Revision: D131013279
@meta-codesync

meta-codesync Bot commented Nov 11, 2026

Copy link
Copy Markdown

This pull request has been merged in 4ff3dd2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant