Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/feature/semantic-text' into in…
Browse files Browse the repository at this point in the history
…ference_metadata_diff
  • Loading branch information
jimczi committed Mar 27, 2024
2 parents 3c878bb + 9531948 commit 254a797
Show file tree
Hide file tree
Showing 1,695 changed files with 39,563 additions and 13,817 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipelines/intake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ steps:
timeout_in_minutes: 300
matrix:
setup:
BWC_VERSION: ["7.17.19", "8.12.3", "8.13.0", "8.14.0"]
BWC_VERSION: ["7.17.20", "8.13.1", "8.14.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
28 changes: 22 additions & 6 deletions .buildkite/pipelines/periodic-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,22 @@ steps:
env:
BWC_VERSION: 7.17.19

- label: "{{matrix.image}} / 7.17.20 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v7.17.20
timeout_in_minutes: 300
matrix:
setup:
image:
- rocky-8
- ubuntu-2004
agents:
provider: gcp
image: family/elasticsearch-{{matrix.image}}
machineType: custom-16-32768
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 7.17.20

- label: "{{matrix.image}} / 8.0.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.0.0
timeout_in_minutes: 300
Expand Down Expand Up @@ -1873,8 +1889,8 @@ steps:
env:
BWC_VERSION: 8.12.2

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

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

- label: "{{matrix.image}} / 8.14.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.14.0
Expand Down
26 changes: 18 additions & 8 deletions .buildkite/pipelines/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,16 @@ steps:
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 7.17.19
- label: 7.17.20 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v7.17.20#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: n1-standard-32
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 7.17.20
- label: 8.0.0 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.0.0#bwcTest
timeout_in_minutes: 300
Expand Down Expand Up @@ -1152,26 +1162,26 @@ steps:
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.12.2
- label: 8.12.3 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.12.3#bwcTest
- label: 8.13.0 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.13.0#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: n1-standard-32
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.12.3
- label: 8.13.0 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.13.0#bwcTest
BWC_VERSION: 8.13.0
- label: 8.13.1 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.13.1#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: n1-standard-32
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.13.0
BWC_VERSION: 8.13.1
- label: 8.14.0 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.14.0#bwcTest
timeout_in_minutes: 300
Expand Down Expand Up @@ -1246,7 +1256,7 @@ steps:
setup:
ES_RUNTIME_JAVA:
- openjdk17
BWC_VERSION: ["7.17.19", "8.12.3", "8.13.0", "8.14.0"]
BWC_VERSION: ["7.17.20", "8.13.1", "8.14.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down Expand Up @@ -1290,7 +1300,7 @@ steps:
- openjdk17
- openjdk21
- openjdk22
BWC_VERSION: ["7.17.19", "8.12.3", "8.13.0", "8.14.0"]
BWC_VERSION: ["7.17.20", "8.13.1", "8.14.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
13 changes: 13 additions & 0 deletions .buildkite/pipelines/pull-request/part-1-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
config:
allow-labels: "test-arm"
steps:
- label: part-1-arm
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed checkPart1
timeout_in_minutes: 300
agents:
provider: aws
imagePrefix: elasticsearch-ubuntu-2004-aarch64
instanceType: m6g.8xlarge
diskSizeGb: 350
diskType: gp3
diskName: /dev/sda1
13 changes: 13 additions & 0 deletions .buildkite/pipelines/pull-request/part-2-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
config:
allow-labels: "test-arm"
steps:
- label: part-2-arm
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed checkPart2
timeout_in_minutes: 300
agents:
provider: aws
imagePrefix: elasticsearch-ubuntu-2004-aarch64
instanceType: m6g.8xlarge
diskSizeGb: 350
diskType: gp3
diskName: /dev/sda1
13 changes: 13 additions & 0 deletions .buildkite/pipelines/pull-request/part-3-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
config:
allow-labels: "test-arm"
steps:
- label: part-3-arm
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed checkPart3
timeout_in_minutes: 300
agents:
provider: aws
imagePrefix: elasticsearch-ubuntu-2004-aarch64
instanceType: m6g.8xlarge
diskSizeGb: 350
diskType: gp3
diskName: /dev/sda1
13 changes: 13 additions & 0 deletions .buildkite/pipelines/pull-request/part-4-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
config:
allow-labels: "test-arm"
steps:
- label: part-4-arm
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed checkPart4
timeout_in_minutes: 300
agents:
provider: aws
imagePrefix: elasticsearch-ubuntu-2004-aarch64
instanceType: m6g.8xlarge
diskSizeGb: 350
diskType: gp3
diskName: /dev/sda1
3 changes: 2 additions & 1 deletion .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ BWC_VERSION:
- "7.17.17"
- "7.17.18"
- "7.17.19"
- "7.17.20"
- "8.0.0"
- "8.0.1"
- "8.1.0"
Expand Down Expand Up @@ -114,6 +115,6 @@ BWC_VERSION:
- "8.12.0"
- "8.12.1"
- "8.12.2"
- "8.12.3"
- "8.13.0"
- "8.13.1"
- "8.14.0"
5 changes: 2 additions & 3 deletions .ci/snapshotBwcVersions
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
BWC_VERSION:
- "7.17.19"
- "8.12.3"
- "8.13.0"
- "7.17.20"
- "8.13.1"
- "8.14.0"
2 changes: 1 addition & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/wrapper-validation-action@699bb18358f12c5b78b37bb0111d3a0e2276e0e2 # Release v2.1.1
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private static Operator operator(DriverContext driverContext, String grouping, S
};
return new HashAggregationOperator(
List.of(supplier(op, dataType, groups.size()).groupingAggregatorFactory(AggregatorMode.SINGLE)),
() -> BlockHash.build(groups, driverContext, 16 * 1024, false),
() -> BlockHash.build(groups, driverContext.blockFactory(), 16 * 1024, false),
driverContext
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

package org.elasticsearch.benchmark.compute.operator;

import org.apache.lucene.util.BytesRef;
import org.elasticsearch.common.breaker.NoopCircuitBreaker;
import org.elasticsearch.common.util.BigArrays;
import org.elasticsearch.compute.data.Block;
Expand All @@ -26,11 +27,13 @@
import org.elasticsearch.xpack.esql.expression.function.scalar.date.DateTrunc;
import org.elasticsearch.xpack.esql.expression.function.scalar.math.Abs;
import org.elasticsearch.xpack.esql.expression.function.scalar.multivalue.MvMin;
import org.elasticsearch.xpack.esql.expression.function.scalar.string.RLike;
import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.Add;
import org.elasticsearch.xpack.esql.planner.Layout;
import org.elasticsearch.xpack.esql.type.EsqlDataTypes;
import org.elasticsearch.xpack.ql.expression.FieldAttribute;
import org.elasticsearch.xpack.ql.expression.Literal;
import org.elasticsearch.xpack.ql.expression.predicate.regex.RLikePattern;
import org.elasticsearch.xpack.ql.tree.Source;
import org.elasticsearch.xpack.ql.type.DataTypes;
import org.elasticsearch.xpack.ql.type.EsField;
Expand Down Expand Up @@ -58,7 +61,6 @@
@State(Scope.Thread)
@Fork(1)
public class EvalBenchmark {
private static final BigArrays BIG_ARRAYS = BigArrays.NON_RECYCLING_INSTANCE; // TODO real big arrays?
private static final BlockFactory blockFactory = BlockFactory.getInstance(
new NoopCircuitBreaker("noop"),
BigArrays.NON_RECYCLING_INSTANCE
Expand All @@ -82,7 +84,9 @@ public class EvalBenchmark {
}
}

@Param({ "abs", "add", "date_trunc", "equal_to_const", "long_equal_to_long", "long_equal_to_int", "mv_min", "mv_min_ascending" })
@Param(
{ "abs", "add", "date_trunc", "equal_to_const", "long_equal_to_long", "long_equal_to_int", "mv_min", "mv_min_ascending", "rlike" }
)
public String operation;

private static Operator operator(String operation) {
Expand Down Expand Up @@ -134,6 +138,11 @@ private static EvalOperator.ExpressionEvaluator evaluator(String operation) {
FieldAttribute longField = longField();
yield EvalMapper.toEvaluator(new MvMin(Source.EMPTY, longField), layout(longField)).get(driverContext);
}
case "rlike" -> {
FieldAttribute keywordField = keywordField();
RLike rlike = new RLike(Source.EMPTY, keywordField, new RLikePattern(".ar"));
yield EvalMapper.toEvaluator(rlike, layout(keywordField)).get(driverContext);
}
default -> throw new UnsupportedOperationException();
};
}
Expand All @@ -146,6 +155,10 @@ private static FieldAttribute intField() {
return new FieldAttribute(Source.EMPTY, "int", new EsField("int", DataTypes.INTEGER, Map.of(), true));
}

private static FieldAttribute keywordField() {
return new FieldAttribute(Source.EMPTY, "keyword", new EsField("keyword", DataTypes.KEYWORD, Map.of(), true));
}

private static Layout layout(FieldAttribute... fields) {
Layout.Builder layout = new Layout.Builder();
layout.append(Arrays.asList(fields));
Expand Down Expand Up @@ -205,6 +218,15 @@ private static void checkExpected(String operation, Page actual) {
}
}
}
case "rlike" -> {
BooleanVector v = actual.<BooleanBlock>getBlock(1).asVector();
for (int i = 0; i < BLOCK_LENGTH; i++) {
boolean expected = i % 2 == 1;
if (v.getBoolean(i) != expected) {
throw new AssertionError("[" + operation + "] expected [" + expected + "] but was [" + v.getBoolean(i) + "]");
}
}
}
default -> throw new UnsupportedOperationException();
}
}
Expand Down Expand Up @@ -250,6 +272,14 @@ private static Page page(String operation) {
}
yield new Page(builder.build());
}
case "rlike" -> {
var builder = blockFactory.newBytesRefVectorBuilder(BLOCK_LENGTH);
BytesRef[] values = new BytesRef[] { new BytesRef("foo"), new BytesRef("bar") };
for (int i = 0; i < BLOCK_LENGTH; i++) {
builder.appendBytesRef(values[i % 2]);
}
yield new Page(builder.build().asBlock());
}
default -> throw new UnsupportedOperationException();
};
}
Expand Down
3 changes: 0 additions & 3 deletions branches.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
{
"branch": "8.13"
},
{
"branch": "8.12"
},
{
"branch": "7.17"
}
Expand Down
4 changes: 4 additions & 0 deletions build-tools-internal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ gradlePlugin {
id = 'elasticsearch.test.fixtures'
implementationClass = 'org.elasticsearch.gradle.internal.testfixtures.TestFixturesPlugin'
}
deployTestFixtures {
id = 'elasticsearch.deploy-test-fixtures'
implementationClass = 'org.elasticsearch.gradle.internal.testfixtures.TestFixturesDeployPlugin'
}
testBase {
id = 'elasticsearch.test-base'
implementationClass = 'org.elasticsearch.gradle.internal.ElasticsearchTestBasePlugin'
Expand Down
4 changes: 2 additions & 2 deletions build-tools-internal/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=85719317abd2112f021d4f41f09ec370534ba288432065f4b477b6a3b652910d
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
distributionSha256Sum=194717442575a6f96e1c1befa2c30e9a4fc90f701d7aee33eb879b79e7ff05c0
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
import org.gradle.api.tasks.Input;
import org.jetbrains.annotations.NotNull;

import java.io.*;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
Expand Down Expand Up @@ -210,12 +215,15 @@ private static void createBuildArchiveTar(List<File> files, File projectDir, Fil
throw new IOException("Support only file!");
}

long entrySize = Files.size(path);
TarArchiveEntry tarEntry = new TarArchiveEntry(path.toFile(), calculateArchivePath(path, projectPath));
tarEntry.setSize(Files.size(path));
tarEntry.setSize(entrySize);
tOut.putArchiveEntry(tarEntry);

// copy file to TarArchiveOutputStream
Files.copy(path, tOut);
try (BufferedInputStream bin = new BufferedInputStream(Files.newInputStream(path))) {
IOUtils.copyLarge(bin, tOut, 0, entrySize);
}
tOut.closeArchiveEntry();

}
Expand Down
Loading

0 comments on commit 254a797

Please sign in to comment.