diff --git a/src/yb/tablet/tablet.cc b/src/yb/tablet/tablet.cc index 54f9694811f5..9c9107814ddb 100644 --- a/src/yb/tablet/tablet.cc +++ b/src/yb/tablet/tablet.cc @@ -504,10 +504,9 @@ Status Tablet::OpenKeyValueTablet() { return std::bind(&Tablet::IntentsDbFlushFilter, this, _1); }); - if (FLAGS_tablet_do_compaction_cleanup_for_intents) { - rocksdb_options.compaction_filter_factory = - std::make_shared(this); - } + rocksdb_options.compaction_filter_factory = + FLAGS_tablet_do_compaction_cleanup_for_intents ? + std::make_shared(this) : nullptr; rocksdb::DB* intents_db = nullptr; RETURN_NOT_OK(rocksdb::DB::Open(rocksdb_options, db_dir + kIntentsDBSuffix, &intents_db));