ibessonov commented on code in PR #7924:
URL: https://github.com/apache/ignite-3/pull/7924#discussion_r3032413830
##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/ClusterManagementGroupManager.java:
##########
@@ -983,7 +986,7 @@ private CmgRaftService startCmgRaftService(Set<String>
nodeNames) {
}
try {
- String thisNodeConsistentId = clusterService.nodeName();
+ String thisNodeConsistentId =
clusterService.staticLocalNode().name();
Review Comment:
Why don't we have `clusterService.nodeName()` anymore? Used to be a useful
shortcut I think
##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/metrics/LocalTopologyMetricsSource.java:
##########
@@ -111,28 +107,22 @@ protected class Holder implements
AbstractMetricSource.Holder<Holder> {
private final UuidGauge localNodeId = new UuidGauge(
"NodeId",
"Unique identifier of the local node",
- () -> physicalTopology.localMember().id());
+ localNode::id);
private final StringGauge localNodeName = new StringGauge(
"NodeName",
"Unique name of the local node",
- () -> physicalTopology.localMember().name());
+ localNode::name);
private final StringGauge networkAddress = new StringGauge(
"NetworkAddress",
"Network address of the local node",
- () -> {
- NetworkAddress addr =
physicalTopology.localMember().address();
- return addr != null ? addr.host() : "";
- });
+ () -> localNode.address().host());
Review Comment:
What kind of address is this? Can it be changed while the node is alive?
##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/impl/MetaStorageLeaderElectionListener.java:
##########
@@ -101,7 +100,7 @@ public class MetaStorageLeaderElectionListener implements
LeaderElectionListener
MetaStorageLeaderElectionListener(
IgniteSpinBusyLock busyLock,
- ClusterService clusterService,
+ String nodeName,
Review Comment:
I'm surprised to see `String` instead of `InternalClusterNode`. How do you
decide what to use?
`MetaStorageManagerImpl` only needs name, as far as I see, but it receives
the node
--
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]