torwig commented on code in PR #2402:
URL: https://github.com/apache/kvrocks/pull/2402#discussion_r1677103644


##########
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:
   Is it OK, that `decodeFieldValue` doesn't assign something to `value` if the 
data structure doesn't have the `METADATA_HASH_FIELD_EXPIRE_MASK` flag?



-- 
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]

Reply via email to