Skip to content

Commit 98f0f66

Browse files
committed
Fix merge
1 parent 84c663e commit 98f0f66

File tree

1 file changed

+9
-7
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session

1 file changed

+9
-7
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/EsqlCCSUtils.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)