Unverified Commit 031f3ea0 authored by Croxx's avatar Croxx Committed by GitHub

Fix default compaction filter creation reason (#643)

* fix default compaction filter creation reason to `Compaction`.
Signed-off-by: 's avatarMrCroxx <mrcroxx@outlook.com>

* add comment for default compaction filter creation reason.
Signed-off-by: 's avatarMrCroxx <mrcroxx@outlook.com>
parent 0f3d38f9
...@@ -211,7 +211,8 @@ pub trait CompactionFilterFactory { ...@@ -211,7 +211,8 @@ pub trait CompactionFilterFactory {
/// should have invoke `create_compaction_filter` and pass KVs through the returned /// should have invoke `create_compaction_filter` and pass KVs through the returned
/// filter. /// filter.
fn should_filter_table_file_creation(&self, reason: DBTableFileCreationReason) -> bool { fn should_filter_table_file_creation(&self, reason: DBTableFileCreationReason) -> bool {
matches!(reason, DBTableFileCreationReason::Flush) // For compatibility, `CompactionFilter`s by default apply during compaction.
matches!(reason, DBTableFileCreationReason::Compaction)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment