Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .buildkite/pipelines/intake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ steps:
timeout_in_minutes: 300
matrix:
setup:
BWC_VERSION: ["8.16.7", "8.17.5", "8.18.0", "8.19.0", "9.0.0", "9.1.0"]
BWC_VERSION: ["8.17.6", "8.18.1", "8.19.0", "9.0.1", "9.1.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
24 changes: 12 additions & 12 deletions .buildkite/pipelines/periodic-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ steps:
env:
BWC_VERSION: 8.15.5

- label: "{{matrix.image}} / 8.16.7 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.16.7
- label: "{{matrix.image}} / 8.16.6 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.16.6
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -301,10 +301,10 @@ steps:
machineType: custom-16-32768
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.16.7
BWC_VERSION: 8.16.6

- label: "{{matrix.image}} / 8.17.5 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.5
- label: "{{matrix.image}} / 8.17.6 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.6
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -317,10 +317,10 @@ steps:
machineType: custom-16-32768
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.17.5
BWC_VERSION: 8.17.6

- label: "{{matrix.image}} / 8.18.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.18.0
- label: "{{matrix.image}} / 8.18.1 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.18.1
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -333,7 +333,7 @@ steps:
machineType: custom-16-32768
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.18.0
BWC_VERSION: 8.18.1

- label: "{{matrix.image}} / 8.19.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.19.0
Expand All @@ -351,8 +351,8 @@ steps:
env:
BWC_VERSION: 8.19.0

- label: "{{matrix.image}} / 9.0.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.0.0
- label: "{{matrix.image}} / 9.0.1 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.0.1
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -365,7 +365,7 @@ steps:
machineType: custom-16-32768
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 9.0.0
BWC_VERSION: 9.0.1

- label: "{{matrix.image}} / 9.1.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.1.0
Expand Down
28 changes: 14 additions & 14 deletions .buildkite/pipelines/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 8.16.7 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.16.7#bwcTest
- label: 8.16.6 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.16.6#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -316,7 +316,7 @@ steps:
buildDirectory: /dev/shm/bk
preemptible: true
env:
BWC_VERSION: 8.16.7
BWC_VERSION: 8.16.6
retry:
automatic:
- exit_status: "-1"
Expand All @@ -325,8 +325,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 8.17.5 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.5#bwcTest
- label: 8.17.6 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.6#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -335,7 +335,7 @@ steps:
buildDirectory: /dev/shm/bk
preemptible: true
env:
BWC_VERSION: 8.17.5
BWC_VERSION: 8.17.6
retry:
automatic:
- exit_status: "-1"
Expand All @@ -344,8 +344,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 8.18.0 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.18.0#bwcTest
- label: 8.18.1 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.18.1#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -354,7 +354,7 @@ steps:
buildDirectory: /dev/shm/bk
preemptible: true
env:
BWC_VERSION: 8.18.0
BWC_VERSION: 8.18.1
retry:
automatic:
- exit_status: "-1"
Expand Down Expand Up @@ -382,8 +382,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 9.0.0 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.0.0#bwcTest
- label: 9.0.1 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.0.1#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -392,7 +392,7 @@ steps:
buildDirectory: /dev/shm/bk
preemptible: true
env:
BWC_VERSION: 9.0.0
BWC_VERSION: 9.0.1
retry:
automatic:
- exit_status: "-1"
Expand Down Expand Up @@ -486,7 +486,7 @@ steps:
setup:
ES_RUNTIME_JAVA:
- openjdk21
BWC_VERSION: ["8.16.7", "8.17.5", "8.18.0", "8.19.0", "9.0.0", "9.1.0"]
BWC_VERSION: ["8.17.6", "8.18.1", "8.19.0", "9.0.1", "9.1.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down Expand Up @@ -533,7 +533,7 @@ steps:
ES_RUNTIME_JAVA:
- openjdk21
- openjdk23
BWC_VERSION: ["8.16.7", "8.17.5", "8.18.0", "8.19.0", "9.0.0", "9.1.0"]
BWC_VERSION: ["8.17.6", "8.18.1", "8.19.0", "9.0.1", "9.1.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
4 changes: 0 additions & 4 deletions .buildkite/scripts/dra-workflow.trigger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ echo "steps:"
source .buildkite/scripts/branches.sh

for BRANCH in "${BRANCHES[@]}"; do
if [[ "$BRANCH" == "9.0" ]]; then
continue
fi

INTAKE_PIPELINE_SLUG="elasticsearch-intake"
BUILD_JSON=$(curl -sH "Authorization: Bearer ${BUILDKITE_API_TOKEN}" "https://api.buildkite.com/v2/organizations/elastic/pipelines/${INTAKE_PIPELINE_SLUG}/builds?branch=${BRANCH}&state=passed&per_page=1" | jq '.[0] | {commit: .commit, url: .web_url}')
LAST_GOOD_COMMIT=$(echo "${BUILD_JSON}" | jq -r '.commit')
Expand Down
8 changes: 4 additions & 4 deletions .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ BWC_VERSION:
- "8.13.4"
- "8.14.3"
- "8.15.5"
- "8.16.7"
- "8.17.5"
- "8.18.0"
- "8.16.6"
- "8.17.6"
- "8.18.1"
- "8.19.0"
- "9.0.0"
- "9.0.1"
- "9.1.0"
7 changes: 3 additions & 4 deletions .ci/snapshotBwcVersions
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
BWC_VERSION:
- "8.16.7"
- "8.17.5"
- "8.18.0"
- "8.17.6"
- "8.18.1"
- "8.19.0"
- "9.0.0"
- "9.0.1"
- "9.1.0"
3 changes: 0 additions & 3 deletions branches.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
{
"branch": "main"
},
{
"branch": "8.16"
},
{
"branch": "9.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ rootProject.name = "root"

include ":distribution:bwc:bugfix"
include ":distribution:bwc:bugfix2"
include ":distribution:bwc:bugfix3"
include ":distribution:bwc:minor"
include ":distribution:bwc:major"
include ":distribution:bwc:staged"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private Map<Version, UnreleasedVersionInfo> computeUnreleased(List<String> devel
.sorted(reverseOrder(comparing(s -> Version.fromString(s, Version.Mode.RELAXED))))
.toList();

boolean existingBugfix = false;
int bugfixCount = 0;
boolean existingStaged = false;
for (int i = 0; i < featureFreezeBranches.size(); i++) {
String branch = featureFreezeBranches.get(i);
Expand Down Expand Up @@ -198,9 +198,9 @@ private Map<Version, UnreleasedVersionInfo> computeUnreleased(List<String> devel
result.put(version, new UnreleasedVersionInfo(version, branch, ":distribution:bwc:" + project));
existingStaged = true;
} else { // This is a bugfix
String project = existingBugfix ? "bugfix2" : "bugfix";
bugfixCount++;
String project = "bugfix" + (bugfixCount > 1 ? bugfixCount : "");
result.put(version, new UnreleasedVersionInfo(version, branch, ":distribution:bwc:" + project));
existingBugfix = true;
}
}

Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ allprojects {
// ensure we have best possible caching of bwc builds
dependsOn ":distribution:bwc:bugfix:buildBwcLinuxTar"
dependsOn ":distribution:bwc:bugfix2:buildBwcLinuxTar"
dependsOn ":distribution:bwc:bugfix3:buildBwcLinuxTar"
dependsOn ":distribution:bwc:minor:buildBwcLinuxTar"
dependsOn ":distribution:bwc:staged:buildBwcLinuxTar"
dependsOn ":distribution:bwc:staged2:buildBwcLinuxTar"
Expand Down
Empty file.
5 changes: 5 additions & 0 deletions docs/changelog/126956.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 126956
summary: Temporarily bypass competitive iteration for filters aggregation
area: Aggregations
type: bug
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
import java.util.Iterator;
import java.util.List;

import static org.elasticsearch.index.query.QueryBuilders.boolQuery;
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
import static org.elasticsearch.index.query.QueryBuilders.termQuery;
import static org.elasticsearch.index.query.QueryBuilders.termsQuery;
import static org.elasticsearch.search.aggregations.AggregationBuilders.avg;
import static org.elasticsearch.search.aggregations.AggregationBuilders.filters;
import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram;
Expand Down Expand Up @@ -95,6 +97,118 @@ public void setupSuiteScopeCluster() throws Exception {
ensureSearchable();
}

// This test replicates a strange filter query & filters aggregation behavior
// we apparently utilize competitive iterators strangely.
// See: https://github.com/elastic/elasticsearch/issues/126955
public void testSimpleWithFilterQuery() throws Exception {
createIndex("filters_idx");
String groupFieldName = "group";
String subGroupFieldName = "subGroup";

int numTotalGroup0 = 500;
String group0Name = "group0";

int numTotalGroup1 = 1000;
String group1Name = "group1";

int subGroup0 = 100;
String subGroup0Name = "subGroup0";

int subGroup1 = 50;
String subGroup1Name = "subGroup1";

int subGroup2 = 25;
String subGroup2Name = "subGroup2";
int others = 10;
String otherName = "others";
List<IndexRequestBuilder> builders = new ArrayList<>();
for (int i = 0; i < numTotalGroup0; i++) {
for (int j = 0; j < subGroup0; j++) {
XContentBuilder source = jsonBuilder().startObject()
.field(groupFieldName, group0Name)
.field(subGroupFieldName, subGroup0Name)
.endObject();
builders.add(prepareIndex("filters_idx").setSource(source));
}
for (int j = 0; j < subGroup1; j++) {
XContentBuilder source = jsonBuilder().startObject()
.field(groupFieldName, group0Name)
.field(subGroupFieldName, subGroup1Name)
.endObject();
builders.add(prepareIndex("filters_idx").setSource(source));
}
for (int j = 0; j < subGroup2; j++) {
XContentBuilder source = jsonBuilder().startObject()
.field(groupFieldName, group0Name)
.field(subGroupFieldName, subGroup2Name)
.endObject();
builders.add(prepareIndex("filters_idx").setSource(source));
}
for (int j = 0; j < others; j++) {
XContentBuilder source = jsonBuilder().startObject()
.field(groupFieldName, group0Name)
.field(subGroupFieldName, otherName)
.endObject();
builders.add(prepareIndex("filters_idx").setSource(source));
}
}
for (int i = 0; i < numTotalGroup1; i++) {
for (int j = 0; j < subGroup0; j++) {
XContentBuilder source = jsonBuilder().startObject()
.field(groupFieldName, group1Name)
.field(subGroupFieldName, subGroup0Name)
.endObject();
builders.add(prepareIndex("filters_idx").setSource(source));
}
for (int j = 0; j < subGroup1; j++) {
XContentBuilder source = jsonBuilder().startObject()
.field(groupFieldName, group1Name)
.field(subGroupFieldName, subGroup1Name)
.endObject();
builders.add(prepareIndex("filters_idx").setSource(source));
}
for (int j = 0; j < subGroup2; j++) {
XContentBuilder source = jsonBuilder().startObject()
.field(groupFieldName, group1Name)
.field(subGroupFieldName, subGroup2Name)
.endObject();
builders.add(prepareIndex("filters_idx").setSource(source));
}
for (int j = 0; j < others; j++) {
XContentBuilder source = jsonBuilder().startObject()
.field(groupFieldName, group1Name)
.field(subGroupFieldName, otherName)
.endObject();
builders.add(prepareIndex("filters_idx").setSource(source));
}
}
indexRandom(true, false, true, builders);
ensureSearchable();
assertNoFailuresAndResponse(
prepareSearch("filters_idx").setSize(0)
.setRequestCache(false)
.setTrackTotalHits(true)
.setQuery(boolQuery().filter(termQuery(groupFieldName + ".keyword", group0Name)))
.addAggregation(
filters(
"results",
new KeyedFilter(subGroup0Name, termsQuery(subGroupFieldName + ".keyword", subGroup0Name)),
new KeyedFilter(subGroup1Name, termsQuery(subGroupFieldName + ".keyword", subGroup1Name)),
new KeyedFilter(subGroup2Name, termsQuery(subGroupFieldName + ".keyword", subGroup2Name))
// This is key
).otherBucket(false)
),
searchResponse -> {
Filters filters = searchResponse.getAggregations().get("results");
assertThat(filters, notNullValue());
assertThat(filters.getName(), equalTo("results"));
Filters.Bucket bucket = filters.getBucketByKey(subGroup0Name);
assertThat(bucket, Matchers.notNullValue());
assertThat(bucket.getDocCount(), equalTo((long) subGroup0 * numTotalGroup0));
}
);
}

public void testSimple() throws Exception {
assertNoFailuresAndResponse(
prepareSearch("idx").addAggregation(
Expand Down
Loading
Loading