Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
saz97 committed Jun 13, 2024
1 parent 71c4da8 commit f09a077
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/storage/src/base_value_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace storage {

enum class DataType : uint8_t { kStrings = 0, kHashes = 1, kSets = 2, kLists = 3, kZSets = 4, kStreams = 5, kHyperloglog = 6, kNones = 7, kAll = 8};
enum class DataType : uint8_t { kStrings = 0, kHashes = 1, kSets = 2, kLists = 3, kZSets = 4, kStreams = 5, kHyperloglog = 8, kNones = 6, kAll = 7};

constexpr char DataTypeTag[] = { 'k', 'h', 's', 'l', 'z', 'x', 'p', 'n', 'a'};//p means hyperloglog
constexpr char* DataTypeStrings[] = { "string", "hash", "set", "list", "zset", "streams", "hyperloglog", "none", "all"};
Expand Down
5 changes: 3 additions & 2 deletions src/storage/src/redis_hyperloglog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "storage/util.h"
#include "src/redis_hyperloglog.h"
#include "src/storage_murmur3.h"
#include "pstd_defer.h"
#include "src/hyperloglog_value_format.h"


Expand Down Expand Up @@ -232,9 +233,9 @@ void Redis::ScanHyperloglog() {

LOG(INFO) << "***************" << "rocksdb instance: " << index_ << " " << "Hyperloglog Data***************";
auto iter = db_->NewIterator(iterator_options);
DEFER() {
DEFER {
delete iter;
}
};
for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
if (!ExpectedMetaValue(DataType::kHyperloglog, iter->value().ToString())) {
continue;
Expand Down

0 comments on commit f09a077

Please sign in to comment.