diff --git a/db/compaction/compaction.cc b/db/compaction/compaction.cc index bbab8f79fb56..ab7e7eaedfc7 100644 --- a/db/compaction/compaction.cc +++ b/db/compaction/compaction.cc @@ -827,6 +827,7 @@ std::unique_ptr 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(); diff --git a/include/rocksdb/compaction_filter.h b/include/rocksdb/compaction_filter.h index 1784f2329ac6..410ee4d3ab0e 100644 --- a/include/rocksdb/compaction_filter.h +++ b/include/rocksdb/compaction_filter.h @@ -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.