@@ -342,16 +342,18 @@ public static void initCrossClusterState(
342342 // initialize the cluster entries in EsqlExecutionInfo before throwing the invalid license error
343343 // so that the CCS telemetry handler can recognize that this error is CCS-related
344344 try {
345- for (var entry : groupedIndices .entrySet ()) {
346- final String clusterAlias = entry .getKey ();
347- final String indexExpr = Strings .arrayToCommaDelimitedString (entry .getValue ().indices ());
348- executionInfo .swapCluster (clusterAlias , (k , v ) -> {
349- assert v == null : "No cluster for " + clusterAlias + " should have been added to ExecutionInfo yet" ;
350- return new EsqlExecutionInfo .Cluster (clusterAlias , indexExpr , executionInfo .shouldSkipOnFailure (clusterAlias ));
351- });
345+ for (var entry : groupedIndices .entrySet ()) {
346+ final String clusterAlias = entry .getKey ();
347+ final String indexExpr = Strings .arrayToCommaDelimitedString (entry .getValue ().indices ());
348+ executionInfo .swapCluster (clusterAlias , (k , v ) -> {
349+ assert v == null : "No cluster for " + clusterAlias + " should have been added to ExecutionInfo yet" ;
350+ return new EsqlExecutionInfo .Cluster (clusterAlias , indexExpr , executionInfo .shouldSkipOnFailure (clusterAlias ));
351+ });
352+ }
352353 } finally {
353354 executionInfo .clusterInfoInitializing (false );
354355 }
356+
355357 // check if it is a cross-cluster query
356358 if (groupedIndices .size () > 1 || groupedIndices .containsKey (RemoteClusterService .LOCAL_CLUSTER_GROUP_KEY ) == false ) {
357359 if (EsqlLicenseChecker .isCcsAllowed (licenseState ) == false ) {
0 commit comments