jjz921024 commented on code in PR #2402: URL: https://github.com/apache/kvrocks/pull/2402#discussion_r1677903731
########## src/types/redis_hash.cc: ########## @@ -58,7 +65,10 @@ rocksdb::Status Hash::Get(const Slice &user_key, const Slice &field, std::string rocksdb::ReadOptions read_options; read_options.snapshot = ss.GetSnapShot(); std::string sub_key = InternalKey(ns_key, field, metadata.version, storage_->IsSlotIdEncoded()).Encode(); - return storage_->Get(read_options, sub_key, value); + s = storage_->Get(read_options, sub_key, value); + if (!s.ok()) return s; + uint64_t expire = 0; + return decodeFieldValue(metadata, value, expire); Review Comment: Yes. Inside the `decodeFieldValue`, if doesn't have `METADATA_HASH_FIELD_EXPIRE_MASK` flag will return directly and don't do anything. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
