Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9216000
2 changes: 1 addition & 1 deletion server/src/main/resources/transport/upper_bounds/9.3.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
inference_api_eis_authorization_persistent_task,9215000
esql_concrete_indices,9216000
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,17 @@ public void testAsyncQueriesWithLimit0() throws IOException {

EsqlExecutionInfo.Cluster remoteCluster = executionInfo.getCluster(REMOTE_CLUSTER_1);
assertThat(remoteCluster.getTook().millis(), lessThanOrEqualTo(overallTookMillis));
assertThat(remoteCluster.getIndexExpression(), equalTo("logs*"));
assertThat(remoteCluster.getOriginalIndices(), equalTo("logs*"));
assertClusterInfoSuccess(remoteCluster, 0);

EsqlExecutionInfo.Cluster remote2Cluster = executionInfo.getCluster(REMOTE_CLUSTER_2);
assertClusterInfoSuccess(remote2Cluster, 0);
assertThat(remote2Cluster.getIndexExpression(), equalTo("logs*"));
assertThat(remote2Cluster.getOriginalIndices(), equalTo("logs*"));
assertThat(remote2Cluster.getTook().millis(), lessThanOrEqualTo(overallTookMillis));

EsqlExecutionInfo.Cluster localCluster = executionInfo.getCluster(LOCAL_CLUSTER);
assertClusterInfoSuccess(localCluster, 0);
assertThat(localCluster.getIndexExpression(), equalTo("logs*"));
assertThat(localCluster.getOriginalIndices(), equalTo("logs*"));
assertThat(localCluster.getTook().millis(), lessThanOrEqualTo(overallTookMillis));

assertClusterMetadataInResponse(resp, responseExpectMeta, 3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ public void testStopQuery() throws Exception {
assertThat(executionInfo.isPartial(), equalTo(true));

EsqlExecutionInfo.Cluster remoteCluster = executionInfo.getCluster(REMOTE_CLUSTER_1);
assertThat(remoteCluster.getIndexExpression(), equalTo("logs-*"));
assertThat(remoteCluster.getOriginalIndices(), equalTo("logs-*"));
assertClusterInfoSuccess(remoteCluster, remote1NumShards);

EsqlExecutionInfo.Cluster remote2Cluster = executionInfo.getCluster(REMOTE_CLUSTER_2);
assertThat(remote2Cluster.getIndexExpression(), equalTo("blocking"));
assertThat(remote2Cluster.getOriginalIndices(), equalTo("blocking"));
assertThat(remote2Cluster.getStatus(), equalTo(EsqlExecutionInfo.Cluster.Status.PARTIAL));

EsqlExecutionInfo.Cluster localCluster = executionInfo.getCluster(LOCAL_CLUSTER);
assertThat(localCluster.getIndexExpression(), equalTo("logs-*"));
assertThat(localCluster.getOriginalIndices(), equalTo("logs-*"));
assertClusterInfoSuccess(localCluster, localNumShards);

assertClusterMetadataInResponse(asyncResponse, responseExpectMeta, 3);
Expand Down Expand Up @@ -214,15 +214,15 @@ public void testStopQueryLocal() throws Exception {
assertThat(executionInfo.isPartial(), equalTo(true));

EsqlExecutionInfo.Cluster remoteCluster = executionInfo.getCluster(REMOTE_CLUSTER_1);
assertThat(remoteCluster.getIndexExpression(), equalTo("logs-*"));
assertThat(remoteCluster.getOriginalIndices(), equalTo("logs-*"));
assertClusterInfoSuccess(remoteCluster, remote1NumShards);

EsqlExecutionInfo.Cluster remote2Cluster = executionInfo.getCluster(REMOTE_CLUSTER_2);
assertThat(remote2Cluster.getIndexExpression(), equalTo("logs-*"));
assertThat(remote2Cluster.getOriginalIndices(), equalTo("logs-*"));
assertClusterInfoSuccess(remote2Cluster, remote2NumShards);

EsqlExecutionInfo.Cluster localCluster = executionInfo.getCluster(LOCAL_CLUSTER);
assertThat(localCluster.getIndexExpression(), equalTo("blocking"));
assertThat(localCluster.getOriginalIndices(), equalTo("blocking"));
assertThat(localCluster.getStatus(), equalTo(EsqlExecutionInfo.Cluster.Status.PARTIAL));

assertClusterMetadataInResponse(asyncResponse, responseExpectMeta, 3);
Expand Down Expand Up @@ -346,11 +346,11 @@ public void testStopQueryInlineStats() throws Exception {
assertThat(executionInfo.isPartial(), equalTo(true));

EsqlExecutionInfo.Cluster remote2Cluster = executionInfo.getCluster(REMOTE_CLUSTER_2);
assertThat(remote2Cluster.getIndexExpression(), equalTo("blocking"));
assertThat(remote2Cluster.getOriginalIndices(), equalTo("blocking"));
assertThat(remote2Cluster.getStatus(), equalTo(EsqlExecutionInfo.Cluster.Status.PARTIAL));

EsqlExecutionInfo.Cluster localCluster = executionInfo.getCluster(LOCAL_CLUSTER);
assertThat(localCluster.getIndexExpression(), equalTo("logs-*"));
assertThat(localCluster.getOriginalIndices(), equalTo("logs-*"));
assertThat(localCluster.getStatus(), equalTo(EsqlExecutionInfo.Cluster.Status.PARTIAL));

assertClusterMetadataInResponse(asyncResponse, responseExpectMeta, 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ private static void assertCCSExecutionInfoDetails(EsqlExecutionInfo executionInf
for (EsqlExecutionInfo.Cluster cluster : clusters) {
assertThat(cluster.getTook().millis(), greaterThanOrEqualTo(0L));
assertThat(cluster.getStatus(), equalTo(EsqlExecutionInfo.Cluster.Status.SUCCESSFUL));
assertThat(cluster.getIndexExpression(), equalTo("events"));
assertThat(cluster.getOriginalIndices(), equalTo("events"));
assertThat(cluster.getTotalShards(), equalTo(1));
assertThat(cluster.getSuccessfulShards(), equalTo(1));
assertThat(cluster.getSkippedShards(), equalTo(0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected Map<String, Boolean> skipUnavailableForRemoteClusters() {
}

protected void assertClusterInfoSuccess(EsqlExecutionInfo.Cluster clusterInfo, int numShards, long overallTookMillis) {
assertThat(clusterInfo.getIndexExpression(), equalTo("logs-*"));
assertThat(clusterInfo.getOriginalIndices(), equalTo("logs-*"));
assertThat(clusterInfo.getTook().millis(), lessThanOrEqualTo(overallTookMillis));
super.assertClusterInfoSuccess(clusterInfo, numShards);
}
Expand Down Expand Up @@ -471,7 +471,7 @@ public void assertExpectedClustersForMissingIndicesTests(EsqlExecutionInfo execu
for (ExpectedCluster expectedCluster : expected) {
EsqlExecutionInfo.Cluster cluster = executionInfo.getCluster(expectedCluster.clusterAlias());
String msg = cluster.getClusterAlias();
assertThat(msg, cluster.getIndexExpression(), equalTo(expectedCluster.indexExpression()));
assertThat(msg, cluster.getOriginalIndices(), equalTo(expectedCluster.indexExpression()));
assertThat(msg, cluster.getStatus(), equalTo(expectedCluster.status()));
assertThat(msg, cluster.getTook().millis(), greaterThanOrEqualTo(0L));
assertThat(msg, cluster.getTook().millis(), lessThanOrEqualTo(overallTookMillis));
Expand Down Expand Up @@ -542,11 +542,11 @@ public void testSearchesWhereNonExistentClusterIsSpecifiedWithWildcards() throws
assertThat(executionInfo.clusterAliases(), equalTo(Set.of(REMOTE_CLUSTER_1, LOCAL_CLUSTER)));

EsqlExecutionInfo.Cluster remoteCluster = executionInfo.getCluster(REMOTE_CLUSTER_1);
assertThat(remoteCluster.getIndexExpression(), equalTo("no_such_index*"));
assertThat(remoteCluster.getOriginalIndices(), equalTo("no_such_index*"));
assertClusterInfoSuccess(remoteCluster, 0);

EsqlExecutionInfo.Cluster localCluster = executionInfo.getCluster(LOCAL_CLUSTER);
assertThat(localCluster.getIndexExpression(), equalTo("logs-*,no_such_index*"));
assertThat(localCluster.getOriginalIndices(), equalTo("logs-*,no_such_index*"));
assertClusterInfoSuccess(localCluster, localNumShards);
} finally {
clearSkipUnavailable();
Expand Down Expand Up @@ -588,7 +588,7 @@ public void testCCSExecutionOnSearchesWithLimit0() throws Exception {
assertThat(executionInfo.clusterAliases(), equalTo(Set.of(REMOTE_CLUSTER_1, LOCAL_CLUSTER)));

EsqlExecutionInfo.Cluster remoteCluster = executionInfo.getCluster(REMOTE_CLUSTER_1);
assertThat(remoteCluster.getIndexExpression(), equalTo("*"));
assertThat(remoteCluster.getOriginalIndices(), equalTo("*"));
assertThat(remoteCluster.getTook().millis(), lessThanOrEqualTo(overallTookMillis));
assertClusterInfoSuccess(remoteCluster, 0);

Expand Down Expand Up @@ -792,7 +792,7 @@ public void testRemoteFailureSkipUnavailableTrue() throws IOException {
assertThat(executionInfo.overallTook().millis(), greaterThanOrEqualTo(0L));

EsqlExecutionInfo.Cluster remoteCluster = executionInfo.getCluster(REMOTE_CLUSTER_1);
assertThat(remoteCluster.getIndexExpression(), equalTo("logs-2*"));
assertThat(remoteCluster.getOriginalIndices(), equalTo("logs-2*"));
assertClusterInfoSkipped(remoteCluster);
assertThat(remoteCluster.getFailures().getFirst().reason(), containsString("Accessing failing field"));
}
Expand All @@ -813,7 +813,7 @@ public void testRemoteFailureInlinestats() throws IOException {
assertThat(executionInfo.overallTook().millis(), greaterThanOrEqualTo(0L));

EsqlExecutionInfo.Cluster remoteCluster = executionInfo.getCluster(REMOTE_CLUSTER_1);
assertThat(remoteCluster.getIndexExpression(), equalTo("logs-2*"));
assertThat(remoteCluster.getOriginalIndices(), equalTo("logs-2*"));
assertClusterInfoSkipped(remoteCluster);
assertThat(remoteCluster.getFailures().getFirst().reason(), containsString("Accessing failing field"));
}
Expand All @@ -827,7 +827,7 @@ public void testRemoteFailureInlinestats() throws IOException {
assertThat(executionInfo.overallTook().millis(), greaterThanOrEqualTo(0L));

EsqlExecutionInfo.Cluster remoteCluster = executionInfo.getCluster(REMOTE_CLUSTER_1);
assertThat(remoteCluster.getIndexExpression(), equalTo("logs-2*"));
assertThat(remoteCluster.getOriginalIndices(), equalTo("logs-2*"));
assertClusterInfoSkipped(remoteCluster);
assertThat(remoteCluster.getFailures().getFirst().reason(), containsString("Accessing failing field"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ protected boolean reuseClusters() {
}

protected void assertClusterInfoSkipped(EsqlExecutionInfo.Cluster clusterInfo, long overallTookMillis) {
assertThat(clusterInfo.getIndexExpression(), equalTo("logs-*"));
assertThat(clusterInfo.getOriginalIndices(), equalTo("logs-*"));
assertThat(clusterInfo.getTook().millis(), lessThanOrEqualTo(overallTookMillis));
super.assertClusterInfoSkipped(clusterInfo);
}

protected void assertClusterInfoSuccess(EsqlExecutionInfo.Cluster clusterInfo, int numShards, long overallTookMillis) {
assertThat(clusterInfo.getIndexExpression(), equalTo("logs-*"));
assertThat(clusterInfo.getOriginalIndices(), equalTo("logs-*"));
assertThat(clusterInfo.getTook().millis(), lessThanOrEqualTo(overallTookMillis));
super.assertClusterInfoSuccess(clusterInfo, numShards);
}
Expand Down Expand Up @@ -110,11 +110,11 @@ public void testCCSAgainstDisconnectedRemoteWithSkipUnavailableTrue() throws Exc

EsqlExecutionInfo.Cluster remote2Cluster = executionInfo.getCluster(REMOTE_CLUSTER_2);
assertClusterInfoSkipped(remote1Cluster);
assertThat(remote2Cluster.getIndexExpression(), equalTo("nomatch*"));
assertThat(remote2Cluster.getOriginalIndices(), equalTo("nomatch*"));
assertThat(remote2Cluster.getTook().millis(), lessThanOrEqualTo(overallTookMillis));

EsqlExecutionInfo.Cluster localCluster = executionInfo.getCluster(LOCAL_CLUSTER);
assertThat(localCluster.getIndexExpression(), equalTo("nomatch*"));
assertThat(localCluster.getOriginalIndices(), equalTo("nomatch*"));
// local cluster should never be marked as SKIPPED
assertClusterInfoSuccess(localCluster, 0);
assertThat(localCluster.getTook().millis(), lessThanOrEqualTo(overallTookMillis));
Expand Down Expand Up @@ -228,11 +228,11 @@ public void testCCSAgainstDisconnectedRemoteWithSkipUnavailableTrueInlineStats()

EsqlExecutionInfo.Cluster remote2Cluster = executionInfo.getCluster(REMOTE_CLUSTER_2);
assertClusterInfoSkipped(remote1Cluster);
assertThat(remote2Cluster.getIndexExpression(), equalTo("nomatch*"));
assertThat(remote2Cluster.getOriginalIndices(), equalTo("nomatch*"));
assertThat(remote2Cluster.getTook().millis(), lessThanOrEqualTo(overallTookMillis));

EsqlExecutionInfo.Cluster localCluster = executionInfo.getCluster(LOCAL_CLUSTER);
assertThat(localCluster.getIndexExpression(), equalTo("nomatch*"));
assertThat(localCluster.getOriginalIndices(), equalTo("nomatch*"));
// local cluster should never be marked as SKIPPED
assertClusterInfoSuccess(localCluster, 0);
assertThat(localCluster.getTook().millis(), lessThanOrEqualTo(overallTookMillis));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected boolean reuseClusters() {
}

protected void assertClusterMetadata(EsqlExecutionInfo.Cluster clusterMetatata, long took, String indexExpression, Status status) {
assertThat(clusterMetatata.getIndexExpression(), equalTo(indexExpression));
assertThat(clusterMetatata.getOriginalIndices(), equalTo(indexExpression));
assertThat(clusterMetatata.getStatus(), equalTo(status));
assertThat(clusterMetatata.getTook().millis(), greaterThanOrEqualTo(0L));
assertThat(clusterMetatata.getTook().millis(), lessThanOrEqualTo(took));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,10 @@ public void testPartialResolution() {
assertAcked(client().admin().indices().prepareCreate("index-2"));
indexRandom(true, "index-2", 1);

try (var response = run(syncEsqlQueryRequest().query("FROM index-1,nonexisting-1"))) {
assertOk(response); // okay when present index is empty
}
// TODO
// try (var response = run(syncEsqlQueryRequest().query("FROM index-1,nonexisting-1"))) {
// assertOk(response); // okay when present index is empty
// }
expectThrows(
IndexNotFoundException.class,
equalTo("no such index [nonexisting-1]"), // fails when present index is non-empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ private static List<EsqlResponseExecutionInfo> executionInfo(EsqlQueryResponse r
.getClusters()
.values()
.stream()
.map(cluster -> new EsqlResponseExecutionInfo(cluster.getClusterAlias(), cluster.getIndexExpression(), cluster.getStatus()))
.map(cluster -> new EsqlResponseExecutionInfo(cluster.getClusterAlias(), cluster.getOriginalIndices(), cluster.getStatus()))
.toList();
}

Expand Down
Loading