Skip to content

Support partial results in CCS in ES|QL #122708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Feb 20, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
assert doc stats
  • Loading branch information
dnhatn committed Feb 17, 2025
commit 1252fba4fb8ac2a742789090fd722c00c3fc6983
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import static org.elasticsearch.xpack.esql.EsqlTestUtils.getValuesList;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.in;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
Expand Down Expand Up @@ -310,13 +311,18 @@ private Set<String> populateIndexWithFailingFields(String clusterAlias, String i
);
Set<String> ids = new HashSet<>();
String tag = clusterAlias.isEmpty() ? "local" : clusterAlias;
int numDocs = between(50, 100); // large enough to have failing documents in every shard
int numDocs = between(1, 100); // large enough to have failing documents in every shard
for (int i = 0; i < numDocs; i++) {
String id = Long.toString(nextDocId.incrementAndGet());
client.prepareIndex(indexName).setSource("id", id, "tag", tag, "v", i).get();
ids.add(id);
}
client.admin().indices().prepareRefresh(indexName).get();
for (var shardStats : client.admin().indices().prepareStats(indexName).clear().setDocs(true).get().getShards()) {
var docsStats = shardStats.getStats().docs;
assertNotNull(docsStats);
assertThat("no doc for shard " + shardStats.getShardRouting().shardId(), docsStats.getCount(), greaterThan(0L));
}
return ids;
}
}