You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by "hubcio (via GitHub)" <gi...@apache.org> on 2025/11/21 20:08:44 UTC
[PR] feat(cluster): add full transport endpoints to cluster configuration [iggy]
hubcio opened a new pull request, #2393:
URL: https://github.com/apache/iggy/pull/2393
BREAKING CHANGE: ClusterNode now uses TransportEndpoints instead of single address
- Add TransportEndpoints struct with TCP, QUIC, HTTP, WebSocket addresses
- Restructure cluster config: current node (name only) + other nodes (full details)
- Current node derives ports from main transport configs to avoid duplication
- Update SDK leader detection to use appropriate transport endpoint
- Fix integration tests for new configuration structure
This enables cluster nodes to have complete information about all transport endpoints of other nodes, supporting multi-protocol cluster communication.
--
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: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(cluster): add full transport endpoints to cluster configuration [iggy]
Posted by "hubcio (via GitHub)" <gi...@apache.org>.
hubcio commented on code in PR #2393:
URL: https://github.com/apache/iggy/pull/2393#discussion_r2554972193
##########
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,
Review Comment:
lets leave it as is
--
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: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(cluster): add full transport endpoints to cluster configuration [iggy]
Posted by "spetz (via GitHub)" <gi...@apache.org>.
spetz commented on code in PR #2393:
URL: https://github.com/apache/iggy/pull/2393#discussion_r2552446731
##########
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,
Review Comment:
Same remark here about `IpAddr` type if it makes sense.
--
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: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(cluster): add full transport endpoints to cluster configuration [iggy]
Posted by "spetz (via GitHub)" <gi...@apache.org>.
spetz commented on code in PR #2393:
URL: https://github.com/apache/iggy/pull/2393#discussion_r2554978578
##########
core/common/src/types/cluster/node.rs:
##########
@@ -18,17 +18,19 @@
use crate::{
BytesSerializable, IggyError,
- types::cluster::{role::ClusterNodeRole, status::ClusterNodeStatus},
+ types::cluster::{
+ role::ClusterNodeRole, status::ClusterNodeStatus, transport_endpoints::TransportEndpoints,
+ },
};
use bytes::{BufMut, Bytes, BytesMut};
use serde::{Deserialize, Serialize};
use std::fmt::Display;
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct ClusterNode {
- pub id: u32,
pub name: String,
- pub address: String,
+ pub ip: String,
Review Comment:
Ok, thought of just raw string under the hood.
--
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: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(cluster): add full transport endpoints to cluster configuration [iggy]
Posted by "spetz (via GitHub)" <gi...@apache.org>.
spetz commented on code in PR #2393:
URL: https://github.com/apache/iggy/pull/2393#discussion_r2552440954
##########
core/common/src/types/cluster/node.rs:
##########
@@ -18,17 +18,19 @@
use crate::{
BytesSerializable, IggyError,
- types::cluster::{role::ClusterNodeRole, status::ClusterNodeStatus},
+ types::cluster::{
+ role::ClusterNodeRole, status::ClusterNodeStatus, transport_endpoints::TransportEndpoints,
+ },
};
use bytes::{BufMut, Bytes, BytesMut};
use serde::{Deserialize, Serialize};
use std::fmt::Display;
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct ClusterNode {
- pub id: u32,
pub name: String,
- pub address: String,
+ pub ip: String,
Review Comment:
Should we use `IpAddr` instead of string?
--
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: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(cluster): add full transport endpoints to cluster configuration [iggy]
Posted by "hubcio (via GitHub)" <gi...@apache.org>.
hubcio commented on code in PR #2393:
URL: https://github.com/apache/iggy/pull/2393#discussion_r2554981193
##########
core/common/src/types/cluster/transport_endpoints.rs:
##########
@@ -0,0 +1,118 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use crate::{BytesSerializable, IggyError};
+use bytes::{BufMut, Bytes, BytesMut};
+use serde::{Deserialize, Serialize};
+use std::fmt::Display;
+
+#[derive(Debug, Deserialize, Serialize, Clone)]
+pub struct TransportEndpoints {
Review Comment:
fixed, now `TransportEndpoints` is not Optional but each port inside is.
--
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: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(cluster): add full transport endpoints to cluster configuration [iggy]
Posted by "hubcio (via GitHub)" <gi...@apache.org>.
hubcio merged PR #2393:
URL: https://github.com/apache/iggy/pull/2393
--
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: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(cluster): add full transport endpoints to cluster configuration [iggy]
Posted by "hubcio (via GitHub)" <gi...@apache.org>.
hubcio commented on code in PR #2393:
URL: https://github.com/apache/iggy/pull/2393#discussion_r2554944556
##########
core/common/src/types/cluster/node.rs:
##########
@@ -18,17 +18,19 @@
use crate::{
BytesSerializable, IggyError,
- types::cluster::{role::ClusterNodeRole, status::ClusterNodeStatus},
+ types::cluster::{
+ role::ClusterNodeRole, status::ClusterNodeStatus, transport_endpoints::TransportEndpoints,
+ },
};
use bytes::{BufMut, Bytes, BytesMut};
use serde::{Deserialize, Serialize};
use std::fmt::Display;
#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct ClusterNode {
- pub id: u32,
pub name: String,
- pub address: String,
+ pub ip: String,
Review Comment:
let's leave it as is - this will be serialized/deserialized by other SDKs. if we use IpAddr, how should we serialize/deserialize it?
--
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: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(cluster): add full transport endpoints to cluster configuration [iggy]
Posted by "spetz (via GitHub)" <gi...@apache.org>.
spetz commented on code in PR #2393:
URL: https://github.com/apache/iggy/pull/2393#discussion_r2552444180
##########
core/common/src/types/cluster/transport_endpoints.rs:
##########
@@ -0,0 +1,118 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use crate::{BytesSerializable, IggyError};
+use bytes::{BufMut, Bytes, BytesMut};
+use serde::{Deserialize, Serialize};
+use std::fmt::Display;
+
+#[derive(Debug, Deserialize, Serialize, Clone)]
+pub struct TransportEndpoints {
Review Comment:
Since each transport is optional, maybe all these fields could be of `Option<u16>` type?
--
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: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(cluster): add full transport endpoints to cluster configuration [iggy]
Posted by "spetz (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org