diff --git a/src/storage/rdb.cc b/src/storage/rdb.cc index ed55ddcdcd3..43bad3a022d 100644 --- a/src/storage/rdb.cc +++ b/src/storage/rdb.cc @@ -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>(obj); - std::vector filed_values; - filed_values.reserve(entries.size()); + std::vector 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>(obj); diff --git a/src/storage/rdb.h b/src/storage/rdb.h index 4f8b95dbca7..8865c5b8ed3 100644 --- a/src/storage/rdb.h +++ b/src/storage/rdb.h @@ -128,7 +128,7 @@ class RDB { Status SaveZSetObject(const std::vector &member_scores); // Hash - Status SaveHashObject(const std::vector &filed_value); + Status SaveHashObject(const std::vector &field_value); private: engine::Storage *storage_;