PragmaTwice commented on code in PR #2142:
URL: https://github.com/apache/kvrocks/pull/2142#discussion_r1576375736


##########
src/storage/redis_metadata.cc:
##########
@@ -489,3 +489,20 @@ rocksdb::Status SearchMetadata::Decode(Slice *input) {
 
   return rocksdb::Status::OK();
 }
+
+void HyperloglogMetadata::Encode(std::string *dst) const {
+  Metadata::Encode(dst);
+  PutFixed8(dst, static_cast<uint8_t>(encode_type_));
+}
+
+rocksdb::Status HyperloglogMetadata::Decode(Slice *input) {
+  if (auto s = Metadata::Decode(input); !s.ok()) {
+    return s;
+  }
+
+  if (!GetFixed8(input, reinterpret_cast<uint8_t *>(&encode_type_))) {

Review Comment:
   I think it's fine here.



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