ShiKaiWi commented on code in PR #128:
URL: 
https://github.com/apache/incubator-horaedb-proto/pull/128#discussion_r1466073640


##########
protos/meta_service.proto:
##########
@@ -166,20 +166,37 @@ message ShardInfo {
     PartialOpen = 1;
   }
 
+  message Load {
+    uint64 written_bytes = 1;
+    uint64 read_bytes = 2;
+  }
+
   uint32 id = 1;
   cluster.ShardRole role = 2;
   uint64 version = 3;
   // When status is missing, it means Ready
   optional Status status = 4;
+  // When load is missing, it represents the use of an older version of the
+  // protocol
+  optional Load load = 5;
 }
 
 message NodeInfo {
+  message Load {
+    float cpu_usage_core = 6;
+    uint32 cpu_total_core = 7;
+    uint64 memory_total_bytes = 8;
+    uint64 memory_usage_bytes = 9;
+  }

Review Comment:
   Define this message outside the NodeInfo?



##########
protos/meta_service.proto:
##########
@@ -166,20 +166,37 @@ message ShardInfo {
     PartialOpen = 1;
   }
 
+  message Load {
+    uint64 written_bytes = 1;
+    uint64 read_bytes = 2;
+  }

Review Comment:
   Define it outside the `ShardInfo`? Otherwise, it may bring trouble when 
access it.



##########
protos/meta_service.proto:
##########
@@ -166,20 +166,37 @@ message ShardInfo {
     PartialOpen = 1;
   }
 
+  message Load {
+    uint64 written_bytes = 1;
+    uint64 read_bytes = 2;
+  }
+
   uint32 id = 1;
   cluster.ShardRole role = 2;
   uint64 version = 3;
   // When status is missing, it means Ready
   optional Status status = 4;
+  // When load is missing, it represents the use of an older version of the
+  // protocol
+  optional Load load = 5;

Review Comment:
   No need to define it as optional.



##########
protos/meta_service.proto:
##########
@@ -166,20 +166,37 @@ message ShardInfo {
     PartialOpen = 1;
   }
 
+  message Load {
+    uint64 written_bytes = 1;
+    uint64 read_bytes = 2;
+  }
+
   uint32 id = 1;
   cluster.ShardRole role = 2;
   uint64 version = 3;
   // When status is missing, it means Ready
   optional Status status = 4;
+  // When load is missing, it represents the use of an older version of the
+  // protocol
+  optional Load load = 5;
 }
 
 message NodeInfo {
+  message Load {
+    float cpu_usage_core = 6;
+    uint32 cpu_total_core = 7;
+    uint64 memory_total_bytes = 8;
+    uint64 memory_usage_bytes = 9;
+  }
   // ip:port
   string endpoint = 1;
   uint32 lease = 2;
   string zone = 3;
   string binary_version = 4;
   repeated ShardInfo shard_infos = 5;
+  // When load is missing, it represents the use of an older version of the
+  // protocol
+  optional Load load = 6;

Review Comment:
   `optional` is by default in proto3.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to