Skip to content

Commit

Permalink
fix compilation error (#2934)
Browse files Browse the repository at this point in the history
  • Loading branch information
QlQlqiqi authored Oct 28, 2024
1 parent 1ab157c commit b5cdb2f
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/storage/src/redis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,14 @@

#include <sstream>

#include "include/pika_conf.h"
#include "pstd_coding.h"
#include "rocksdb/env.h"
#include "rocksdb/metadata.h"

#include "src/redis.h"
#include "src/lists_filter.h"
#include "src/base_filter.h"
#include "src/zsets_filter.h"
#include "pstd/include/pstd_string.h"
#include "pstd/include/pstd_defer.h"

extern std::unique_ptr<PikaConf> g_pika_conf;

namespace storage {

constexpr const char* ErrTypeMessage = "WRONGTYPE";
Expand All @@ -28,7 +22,7 @@ const rocksdb::Comparator* ListsDataKeyComparator() {
return &ldkc;
}

const rocksdb::Comparator* ZSetsScoreKeyComparator() {
rocksdb::Comparator* ZSetsScoreKeyComparator() {
static ZSetsScoreKeyComparatorImpl zsets_score_key_compare;
return &zsets_score_key_compare;
}
Expand Down Expand Up @@ -163,12 +157,8 @@ Status Redis::Open(const StorageOptions& storage_options, const std::string& db_
column_families.emplace_back("zset_score_cf", zset_score_cf_ops);
// stream CF
column_families.emplace_back("stream_data_cf", stream_data_cf_ops);
ops.listeners.emplace_back(std::make_shared<OBDSstListener>());

// if using obd-compact, we should listening created sst file
// while compacting in OBD-compact
if (g_pika_conf->compaction_strategy() == PikaConf::CompactionStrategy::OldestOrBestDeleteRatioSstCompact) {
ops.listeners.emplace_back(std::make_shared<OBDSstListener>());
}
return rocksdb::DB::Open(ops, db_path, column_families, &handles_, &db_);
}

Expand Down

0 comments on commit b5cdb2f

Please sign in to comment.