forked from scylladb/scylladb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Used by table::make_reader_v2_excluding_sstables to create a sstable_set based on the current one that includes all non-excluded sstables. It checks if the majority of the sstables is included or excluded and picks one of 2 strategies: either cloning the existing set and erasing the excluded sstables out of it, if they are the minority, or making a new set and inserting to it all the non-excluded sstables if the included sstables are the minority. We do that especially for partitioned_sstable_set since inserting to or erasing from its _leveled_sstables interval_map is expensive and we want to avoid that as much as possible to prevent reactor stalls. Refs scylladb#14244 The reason this change doesn't fix the issue entirely is that it will deal with a typical case where the number of excluded sstables (that are staging and processed by the view update generator) is relatively small. But when we have many of them, say about about half of the total number of sstables, calling partitioned_sstable_set::insert or erase enough times without preemption might still stall. Refs scylladb#14089 Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
- Loading branch information
Showing
4 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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