Skip to content

Api to checkpoint only selected set of column families (#15019) - #15019

Open
darik wants to merge 1 commit into
facebook:mainfrom
darik:export-D113963616
Open

Api to checkpoint only selected set of column families (#15019)#15019
darik wants to merge 1 commit into
facebook:mainfrom
darik:export-D113963616

Conversation

@darik

@darik darik commented Jul 29, 2026

Copy link
Copy Markdown

Summary:

RocksDB's Checkpoint API currently copies all column families.
For use cases that only need a subset, this is wasteful.

This diff adds a new CreateCheckpoint(dir, column_families, ...) overload that:

  • Validates input handles (rejects null/foreign handles, coalesces duplicates, always includes default CF).
  • Filters GetLiveFilesStorageInfo to capture only the requested CFs' table/blob files.
  • Post-processes the copied MANIFEST by appending kColumnFamilyDrop records for excluded CFs, so the checkpoint opens without referencing missing files.
  • An empty column_families vector falls through to the existing whole-DB path.

Differential Revision: D113963616

@meta-cla meta-cla Bot added the CLA Signed label Jul 29, 2026
@meta-codesync

meta-codesync Bot commented Jul 29, 2026

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

✅ clang-tidy: No findings on changed lines

Completed in 586.5s.

@meta-codesync meta-codesync Bot changed the title Api to checkpoint only selected set of column families Api to checkpoint only selected set of column families (#15019) Jul 29, 2026
darik pushed a commit to darik/rocksdb that referenced this pull request Jul 29, 2026
Summary:

RocksDB's Checkpoint API currently copies all column families. 
For use cases that only need a subset, this is wasteful.

This diff adds a new `CreateCheckpoint(dir, column_families, ...)` overload that:
 - Validates input handles (rejects null/foreign handles, coalesces duplicates, always includes default CF).
 - Filters GetLiveFilesStorageInfo to capture only the requested CFs' table/blob files.
 - Post-processes the copied MANIFEST by appending kColumnFamilyDrop records for excluded CFs, so the checkpoint opens without referencing missing files.
 - An empty column_families vector falls through to the existing whole-DB path.

Differential Revision: D113963616
@darik
darik force-pushed the export-D113963616 branch from 35c9179 to 4948063 Compare July 29, 2026 19:49
Summary:

RocksDB's Checkpoint API currently copies all column families. 
For use cases that only need a subset, this is wasteful.

This diff adds a new `CreateCheckpoint(dir, column_families, ...)` overload that:
 - Validates input handles (rejects null/foreign handles, coalesces duplicates, always includes default CF).
 - Filters GetLiveFilesStorageInfo to capture only the requested CFs' table/blob files.
 - Post-processes the copied MANIFEST by appending kColumnFamilyDrop records for excluded CFs, so the checkpoint opens without referencing missing files.
 - An empty column_families vector falls through to the existing whole-DB path.

Differential Revision: D113963616
@darik
darik force-pushed the export-D113963616 branch from 4948063 to b92318e Compare July 30, 2026 03:36
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