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


##########
src/storage/redis_metadata.h:
##########
@@ -364,3 +365,45 @@ class TDigestMetadata : public Metadata {
 
   double Delta() const { return 1. / static_cast<double>(compression); }
 };
+
+class TimeSeriesMetadata : public Metadata {
+ public:
+  enum class ChunkType : uint8_t {
+    UNCOMPRESSED = 0,
+    COMPRESSED = 1,
+  };
+
+  enum class TSDuplicatePolicy : uint8_t {
+    BLOCK = 0,
+    FIRST = 1,
+    LAST = 2,
+    MIN = 3,
+    MAX = 4,
+    SUM = 5,
+  };
+
+  uint64_t retention_time;
+  uint64_t chunk_size;
+  ChunkType chunk_type;
+  TSDuplicatePolicy duplicate_policy;
+  std::string source_key;
+
+  explicit TimeSeriesMetadata(bool generate_version = true)
+      : Metadata(kRedisTimeSeries, generate_version),
+        retention_time(0),
+        chunk_size(0),
+        chunk_type(ChunkType::UNCOMPRESSED),
+        duplicate_policy(TSDuplicatePolicy::BLOCK) {}

Review Comment:
   ```suggestion
           duplicate_policy(DuplicatePolicy::BLOCK) {}
   ```



-- 
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: issues-unsubscr...@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to