Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
git-hulk committed Nov 11, 2024
1 parent 2f185a7 commit 9a6fab1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/storage/redis_db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ rocksdb::Status Database::ParseMetadata(RedisTypes types, Slice *bytes, Metadata
// For example, bitmap supports reading string metadata and bitmap metadata.
rocksdb::Status Database::ParseMetadataWithStats(RedisTypes types, Slice *bytes, Metadata *metadata) {
auto s = ParseMetadata(types, bytes, metadata);
storage_->RecordStat(s.ok() ? engine::StatType::KeyspaceHits : engine::StatType::KeyspaceHits, 1);
storage_->RecordStat(s.ok() ? engine::StatType::KeyspaceHits : engine::StatType::KeyspaceMisses, 1);
return s;
}

Expand Down
4 changes: 2 additions & 2 deletions src/types/redis_json.cc
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ rocksdb::Status Json::DebugMemory(engine::Context &ctx, const std::string &user_
}

rocksdb::Status Json::Resp(engine::Context &ctx, const std::string &user_key, const std::string &path,
std::vector<std::string> *results, RESP resp) {
std::vector<std::stringParseMetadataWithStats> *results, RESP resp) {
auto ns_key = AppendNamespacePrefix(user_key);
JsonMetadata metadata;
JsonValue json_val;
Expand All @@ -674,7 +674,7 @@ rocksdb::Status Json::Resp(engine::Context &ctx, const std::string &user_key, co
return rocksdb::Status::OK();
}

rocksdb::Status Json::FromRawString(const std::string &value, JsonValue *result) {
rocksdb::Status Json::FromRawString(std::string_view value, JsonValue *result) {
Slice rest = value;
JsonMetadata metadata;
auto s = ParseMetadata({kRedisJson}, &rest, &metadata);
Expand Down
2 changes: 1 addition & 1 deletion src/types/redis_json.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Json : public Database {

rocksdb::Status Resp(engine::Context &ctx, const std::string &user_key, const std::string &path,
std::vector<std::string> *results, RESP resp);
static rocksdb::Status FromRawString(const std::string &value, JsonValue *result);
static rocksdb::Status FromRawString(std::string_view value, JsonValue *result);

private:
rocksdb::Status write(engine::Context &ctx, Slice ns_key, JsonMetadata *metadata, const JsonValue &json_val);
Expand Down

0 comments on commit 9a6fab1

Please sign in to comment.