Skip to content

Remove redundant files before ingestion #13484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jowlyzhang
Copy link
Contributor

@jowlyzhang jowlyzhang commented Mar 24, 2025

This PR add some logic in the ExternalSstFileIngestionJob::Prepare step to remove redundant files before ingestion. It takes care of two types of redundant files: 1) standalone range deletion file that contains the exactly same range deletion as a previous file, 2) data files that are already range deleted by some follow up file.

Our user's eventual call to IngestExternalFile for replacing old data could end up with this pattern where there are multiple range deletion files and multiple data files chained and it's not possible for them to deduplicate. So we add this change in RocksDB to remove redundant files before ingestion and simplify the scenarios our compaction picking optimization for standalone range deletion file need to deal with.

Test plan:
Added tests

@facebook-github-bot
Copy link
Contributor

@jowlyzhang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@jowlyzhang jowlyzhang marked this pull request as draft March 24, 2025 20:25
@facebook-github-bot
Copy link
Contributor

@jowlyzhang has updated the pull request. You must reimport the pull request before landing.

@jowlyzhang jowlyzhang force-pushed the dedupe_ingested_files branch from 79c4bbb to 7de7fea Compare March 24, 2025 22:34
@facebook-github-bot
Copy link
Contributor

@jowlyzhang has updated the pull request. You must reimport the pull request before landing.

@jowlyzhang jowlyzhang force-pushed the dedupe_ingested_files branch from 7de7fea to e529021 Compare March 24, 2025 22:35
@facebook-github-bot
Copy link
Contributor

@jowlyzhang has updated the pull request. You must reimport the pull request before landing.

@jowlyzhang jowlyzhang force-pushed the dedupe_ingested_files branch from e529021 to a6d9608 Compare March 25, 2025 18:13
@facebook-github-bot
Copy link
Contributor

@jowlyzhang has updated the pull request. You must reimport the pull request before landing.

@jowlyzhang jowlyzhang changed the title Deduplicate standalone range deletion files during ingestion Remove redundant files before ingestion Mar 25, 2025
@facebook-github-bot
Copy link
Contributor

@jowlyzhang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@jowlyzhang jowlyzhang marked this pull request as ready for review March 25, 2025 19:21
@jowlyzhang jowlyzhang requested a review from pdillinger March 25, 2025 20:53
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.

2 participants