tmgodinho commented on code in PR #6469:
URL: https://github.com/apache/ignite-3/pull/6469#discussion_r2301074436
##########
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:
We found out that both the embedded and the Thin client are not available if
the cluster is uninitialized.
In the embedded client we have [this
check](https://github.com/apache/ignite-3/blob/a2c0c6c8eed048304b9793ae4fd5fbf5e7f900d1/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteServerImpl.java#L182-L192)
before allowing the user to access the API.
As a result, we will leave this method with a simple assertion.
--
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]