PragmaTwice commented on code in PR #2142:
URL: https://github.com/apache/kvrocks/pull/2142#discussion_r1697258857
##########
src/storage/redis_metadata.cc:
##########
@@ -472,3 +472,44 @@ rocksdb::Status JsonMetadata::Decode(Slice *input) {
return rocksdb::Status::OK();
}
+
+void SearchMetadata::Encode(std::string *dst) const {
+ Metadata::Encode(dst);
+
+ PutFixed8(dst, uint8_t(on_data_type));
+}
+
+rocksdb::Status SearchMetadata::Decode(Slice *input) {
+ if (auto s = Metadata::Decode(input); !s.ok()) {
+ return s;
+ }
+
+ if (!GetFixed8(input, reinterpret_cast<uint8_t *>(&on_data_type))) {
+ return rocksdb::Status::InvalidArgument(kErrMetadataTooShort);
+ }
+
+ return rocksdb::Status::OK();
+}
Review Comment:
need to delete
--
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]