ptupitsyn commented on code in PR #6469:
URL: https://github.com/apache/ignite-3/pull/6469#discussion_r2297643745


##########
modules/network-api/src/main/java/org/apache/ignite/internal/network/IgniteClusterImpl.java:
##########
@@ -31,8 +32,18 @@
 public class IgniteClusterImpl implements IgniteCluster {
     public final TopologyService topologyService;
 
-    public IgniteClusterImpl(TopologyService topologyService) {
+    public final ClusterIdSupplier clusterIdSupplier;
+
+    public IgniteClusterImpl(TopologyService topologyService, 
ClusterIdSupplier clusterIdSupplier) {
         this.topologyService = topologyService;
+        this.clusterIdSupplier = clusterIdSupplier;
+    }
+
+    @Override
+    public UUID clusterId() {
+        @Nullable UUID ret = clusterIdSupplier.clusterId();
+        assert ret != null : "Should not be null";

Review Comment:
   It can be null if the node has not joined the cluster yet. If we don't want 
to return null, let's throw an exception explaining that node is not part of 
the cluster at this moment and cluster id is not available.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to