Fix range delete file caused MultiScan issue#14028
Closed
xingbowang wants to merge 2 commits intofacebook:mainfrom
Closed
Fix range delete file caused MultiScan issue#14028xingbowang wants to merge 2 commits intofacebook:mainfrom
xingbowang wants to merge 2 commits intofacebook:mainfrom
Conversation
Summary: When there is an ingested SST file that only contains delete range operations, MultiScan may return error "Scan does not intersect with file". This is due to file selection during Prepare uses the file smallest and largest key without considering whether there is any key in the file. This is only a temporary fix. Test Plan: Unit test Reviewers: Subscribers: Tasks: Tags:
|
@xingbowang has imported this pull request. If you are a Meta employee, you can view this in D83986964. |
anand1976
reviewed
Oct 6, 2025
| continue; | ||
| } | ||
| auto const metadata = flevel_->files[i].file_metadata; | ||
| if (metadata->num_entries == metadata->num_range_deletions) { |
Contributor
There was a problem hiding this comment.
This check may have to be done in SetFileIterator() as well. I'm not sure how the test is passing though. Since scan_opts_ is non-null, SetFileIterator would have called Prepare anyway.
Contributor
Author
There was a problem hiding this comment.
You are right. It is called. But SetRequireFileOverlap is not called, so RequireFileOverlap is false. This is why the error is not returned.
anand1976
reviewed
Oct 6, 2025
| TEST_P(UserDefinedIndexTest, RangeDelete) { | ||
| BlockBasedTableOptions table_options; | ||
| options_.num_levels = 50; | ||
| options_.compaction_style = kCompactionStyleUniversal; |
Contributor
There was a problem hiding this comment.
Can you set options_.disable_auto_compactions? Without it, the delete range file may just get compacted away
Contributor
|
@xingbowang merged this pull request in 27625f4. |
xingbowang
pushed a commit
to xingbowang/rocksdb
that referenced
this pull request
Oct 6, 2025
Summary: When there is an ingested SST file that only contains delete range operations, MultiScan may return error "Scan does not intersect with file". This is due to file selection during Prepare uses the file smallest and largest key without considering whether there is any key in the file. This is only a temporary fix. Pull Request resolved: facebook#14028 Test Plan: Unit test Reviewed By: anand1976 Differential Revision: D83986964 Pulled By: xingbowang fbshipit-source-id: e0961ca854e2062c2457be4324817ba073ae785d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
When there is an ingested SST file that only contains delete range operations, MultiScan may return error "Scan does not intersect with file". This is due to file selection during Prepare uses the file smallest and largest key without considering whether there is any key in the file. This is only a temporary fix.
Test Plan:
Unit test
Reviewers:
Subscribers:
Tasks:
Tags: