Skip to content

Commit

Permalink
Merge branch 'limit_write_batch' of github.com:AntiTopQuark/kvrocks i…
Browse files Browse the repository at this point in the history
…nto limit_write_batch
  • Loading branch information
AntiTopQuark committed Sep 3, 2024
2 parents bd68c43 + 27533c0 commit 216567b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/storage/rdb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -483,14 +483,14 @@ Status RDB::saveRdbObject(engine::Context &ctx, int type, const std::string &key
} else if (type == RDBTypeHash || type == RDBTypeHashListPack || type == RDBTypeHashZipList ||
type == RDBTypeHashZipMap) {
const auto &entries = std::get<std::map<std::string, std::string>>(obj);
std::vector<FieldValue> filed_values;
filed_values.reserve(entries.size());
std::vector<FieldValue> field_values;
field_values.reserve(entries.size());
for (const auto &entry : entries) {
filed_values.emplace_back(entry.first, entry.second);
field_values.emplace_back(entry.first, entry.second);
}
redis::Hash hash_db(storage_, ns_);
uint64_t count = 0;
db_status = hash_db.MSet(ctx, key, filed_values, false /*nx*/, &count);
db_status = hash_db.MSet(ctx, key, field_values, false /*nx*/, &count);
} else if (type == RDBTypeList || type == RDBTypeListZipList || type == RDBTypeListQuickList ||
type == RDBTypeListQuickList2) {
const auto &elements = std::get<std::vector<std::string>>(obj);
Expand Down
2 changes: 1 addition & 1 deletion src/storage/rdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class RDB {
Status SaveZSetObject(const std::vector<MemberScore> &member_scores);

// Hash
Status SaveHashObject(const std::vector<FieldValue> &filed_value);
Status SaveHashObject(const std::vector<FieldValue> &field_value);

private:
engine::Storage *storage_;
Expand Down

0 comments on commit 216567b

Please sign in to comment.