Skip to content

Commit

Permalink
Add is_bottommost_level info in CompactionFilter context
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Zhang <[email protected]>
  • Loading branch information
v01dstar committed Sep 24, 2024
1 parent 647f85d commit 1570d85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions db/compaction/compaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,7 @@ std::unique_ptr<CompactionFilter> Compaction::CreateCompactionFilter() const {
context.is_full_compaction = is_full_compaction_;
context.is_manual_compaction = is_manual_compaction_;
context.input_start_level = start_level_;
context.is_bottommost_level = bottommost_level_;
context.column_family_id = cfd_->GetID();
context.reason = TableFileCreationReason::kCompaction;
context.input_table_properties = GetInputTableProperties();
Expand Down
2 changes: 2 additions & 0 deletions include/rocksdb/compaction_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ class CompactionFilter : public Customizable {
// The lowest level among all the input files (if any) used in table
// creation
int input_start_level = kUnknownStartLevel;
// Whether output files are in bottommost level or not.
bool is_bottommost_level;
// The column family that will contain the created table file.
uint32_t column_family_id;
// Reason this table file is being created.
Expand Down

0 comments on commit 1570d85

Please sign in to comment.