krishvishal commented on code in PR #2675:
URL: https://github.com/apache/iggy/pull/2675#discussion_r2781391264


##########
core/metadata/src/stm/mux.rs:
##########
@@ -88,7 +89,57 @@ where
     }
 }
 
+/// Recursive case for variadic tuple pattern: (Head, Tail)

Review Comment:
   I've added type based recursion and snapshotting. Removed string based 
version. 



##########
core/metadata/src/stm/consumer_group.rs:
##########
@@ -225,3 +227,150 @@ impl Handler for ConsumerGroupsInner {
         }
     }
 }
+
+/// Consumer group member snapshot representation for serialization.
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ConsumerGroupMemberSnapshot {
+    pub id: usize,
+    pub client_id: u32,
+    pub partitions: Vec<usize>,
+    pub partition_index: usize,
+}
+
+/// Consumer group snapshot representation for serialization.
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ConsumerGroupSnapshot {
+    pub id: usize,
+    pub name: String,
+    pub partitions: Vec<usize>,
+    pub members: Vec<(usize, ConsumerGroupMemberSnapshot)>,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ConsumerGroupsSnapshot {
+    pub items: Vec<(usize, ConsumerGroupSnapshot)>,
+    pub topic_index: Vec<((usize, usize), Vec<usize>)>,
+    pub topic_name_index: Vec<((String, String), Vec<usize>)>,
+}
+
+impl Snapshotable for ConsumerGroupsInner {

Review Comment:
   Done. 



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