spetz commented on code in PR #2393:
URL: https://github.com/apache/iggy/pull/2393#discussion_r2552449360


##########
core/server/src/configs/cluster.rs:
##########
@@ -16,27 +16,38 @@
  * under the License.
  */
 
-use iggy_common::TransportProtocol;
 use serde::{Deserialize, Serialize};
 
 #[derive(Debug, Deserialize, Serialize, Clone)]
 pub struct ClusterConfig {
     pub enabled: bool,
     pub name: String,
-    pub id: u32,
-    pub transport: TransportProtocol,
     pub node: NodeConfig,
-    pub nodes: Vec<ClusterNodeConfig>,
 }
 
 #[derive(Debug, Deserialize, Serialize, Clone)]
 pub struct NodeConfig {
-    pub id: u32,
+    pub current: CurrentNodeConfig,
+    pub others: Vec<OtherNodeConfig>,
 }
 
 #[derive(Debug, Deserialize, Serialize, Clone)]
-pub struct ClusterNodeConfig {
-    pub id: u32,
+pub struct CurrentNodeConfig {
     pub name: String,
-    pub address: String,
+    pub ip: String,
+}
+
+#[derive(Debug, Deserialize, Serialize, Clone)]
+pub struct OtherNodeConfig {
+    pub name: String,
+    pub ip: String,
+    pub ports: Option<TransportPorts>,

Review Comment:
   Let's make sure to implement the default trait for the full cluster metadata 
config, including `TransportPorts` too. I guess there might be still an issue 
with our highly customized configuration provider, where it's not able to 
override optional values with env var, if the default ones are not provided.



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