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


##########
src/storage/redis_metadata.cc:
##########
@@ -401,3 +401,73 @@ rocksdb::Status StreamMetadata::Decode(const std::string 
&bytes) {
 
   return rocksdb::Status::OK();
 }
+
+void SBChainMetadata::Encode(std::string *dst) {
+  Metadata::Encode(dst);
+
+  PutFixed16(dst, n_filters);
+  PutFixed16(dst, scaling);
+  PutFixed16(dst, expansion);
+}
+
+rocksdb::Status SBChainMetadata::Decode(const std::string &bytes) {
+  Slice input(bytes);
+  if (!GetFixed8(&input, &flags)) {

Review Comment:
   I have looked into this and it seems currently it is hard to reuse 
Metadata::Decode since the output Slice is missing. You can just copy code here 
and I will fix it later after it is merged.



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