Skip to content

Commit

Permalink
Merge branch 'issue-1498' of github.com:Brokenice0415/pika into issue…
Browse files Browse the repository at this point in the history
…-1498
  • Loading branch information
Brokenice0415 committed May 19, 2023
2 parents 46529e7 + 7867031 commit b66739e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/storage/src/redis_hashes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Status RedisHashes::Open(const StorageOptions& storage_options, const std::strin
small_compaction_threshold_ = storage_options.small_compaction_threshold;

rocksdb::Options ops(storage_options.options);
ops.wal_dir = db_path + "/hashes";
Status s = rocksdb::DB::Open(ops, db_path, &db_);
if (s.ok()) {
// create column family
Expand Down
1 change: 1 addition & 0 deletions src/storage/src/redis_lists.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Status RedisLists::Open(const StorageOptions& storage_options, const std::string
small_compaction_threshold_ = storage_options.small_compaction_threshold;

rocksdb::Options ops(storage_options.options);
ops.wal_dir = db_path + "/lists";
Status s = rocksdb::DB::Open(ops, db_path, &db_);
if (s.ok()) {
// Create column family
Expand Down
1 change: 1 addition & 0 deletions src/storage/src/redis_sets.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ rocksdb::Status RedisSets::Open(const StorageOptions& storage_options, const std
small_compaction_threshold_ = storage_options.small_compaction_threshold;

rocksdb::Options ops(storage_options.options);
ops.wal_dir = db_path + "/sets";
rocksdb::Status s = rocksdb::DB::Open(ops, db_path, &db_);
if (s.ok()) {
// create column family
Expand Down
1 change: 1 addition & 0 deletions src/storage/src/redis_strings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ RedisStrings::RedisStrings(Storage* const s, const DataType& type) : Redis(s, ty
Status RedisStrings::Open(const StorageOptions& storage_options, const std::string& db_path) {
rocksdb::Options ops(storage_options.options);
ops.compaction_filter_factory = std::make_shared<StringsFilterFactory>();
ops.wal_dir = db_path + "/strings";

// use the bloom filter policy to reduce disk reads
rocksdb::BlockBasedTableOptions table_ops(storage_options.table_options);
Expand Down
1 change: 1 addition & 0 deletions src/storage/src/redis_zsets.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Status RedisZSets::Open(const StorageOptions& storage_options, const std::string
small_compaction_threshold_ = storage_options.small_compaction_threshold;

rocksdb::Options ops(storage_options.options);
ops.wal_dir = db_path + "/zsets";
Status s = rocksdb::DB::Open(ops, db_path, &db_);
if (s.ok()) {
rocksdb::ColumnFamilyHandle *dcf = nullptr, *scf = nullptr;
Expand Down

0 comments on commit b66739e

Please sign in to comment.