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


##########
src/storage/redis_metadata.cc:
##########
@@ -334,6 +334,29 @@ bool Metadata::IsEmptyableType() const {
 
 bool Metadata::Expired() const { return ExpireAt(util::GetTimeStampMS()); }
 
+bool HashMetadata::IsTTLFieldEncoded() const { return field_encoding == 
HashFieldEncoding::WITH_TTL; }
+
+void HashMetadata::Encode(std::string *dst) const {
+  Metadata::Encode(dst);
+  if (IsTTLFieldEncoded()) {
+    PutFixed8(dst, uint8_t(field_encoding));
+  }

Review Comment:
   ```suggestion
     PutFixed8(dst, uint8_t(field_encoding));
   ```



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