Skip to content

Commit cd4388a

Browse files
Merge branch 'main' of github.com:elastic/elasticsearch into ml-eis-auth-v2
2 parents 7834662 + 279c349 commit cd4388a

File tree

51 files changed

+2124
-394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2124
-394
lines changed

benchmarks/src/main/java/org/elasticsearch/benchmark/index/codec/tsdb/TSDBDocValuesMergeBenchmark.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.elasticsearch.cluster.metadata.DataStream;
2828
import org.elasticsearch.common.logging.LogConfigurator;
2929
import org.elasticsearch.index.codec.Elasticsearch92Lucene103Codec;
30+
import org.elasticsearch.index.codec.tsdb.BinaryDVCompressionMode;
3031
import org.elasticsearch.index.codec.tsdb.es819.ES819TSDBDocValuesFormat;
3132
import org.openjdk.jmh.annotations.Benchmark;
3233
import org.openjdk.jmh.annotations.BenchmarkMode;
@@ -257,7 +258,13 @@ private static IndexWriterConfig createIndexWriterConfig(boolean optimizedMergeE
257258
);
258259
config.setLeafSorter(DataStream.TIMESERIES_LEAF_READERS_SORTER);
259260
config.setMergePolicy(new LogByteSizeMergePolicy());
260-
var docValuesFormat = new ES819TSDBDocValuesFormat(4096, 512, optimizedMergeEnabled);
261+
var docValuesFormat = new ES819TSDBDocValuesFormat(
262+
4096,
263+
512,
264+
optimizedMergeEnabled,
265+
BinaryDVCompressionMode.COMPRESSED_ZSTD_LEVEL_1,
266+
true
267+
);
261268
config.setCodec(new Elasticsearch92Lucene103Codec() {
262269
@Override
263270
public DocValuesFormat getDocValuesFormatForField(String field) {

docs/changelog/137263.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 137263
2+
summary: Add late chunking configuration for JinaAI embedding task settings
3+
area: Machine Learning
4+
type: enhancement
5+
issues: []

docs/changelog/137862.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 137862
2+
summary: "[Vector Search] Fix wrong vector docvalue_fields"
3+
area: Vector Search
4+
type: bug
5+
issues: []

docs/changelog/138204.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/changelog/138265.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 138265
2+
summary: Fix `index.mapping.pattern_text.disable_templating` not registered issue
3+
area: Mapping
4+
type: bug
5+
issues: []

docs/internal/Versioning.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,34 @@ needed to backport to `8.19` you would run (in `main`):
110110
./gradlew generateTransportVersion --name=my_tv --backport-branches=9.1,8.19
111111

112112
In the above case CI will not know what transport version name to update, so you
113-
must run the generate task again as described. After merging the updated transport
114-
version it will need to be backported to all the applicable branches.
113+
must run the generate task again as described. After merging the updated
114+
transport version it will need to be backported to all the applicable branches.
115+
Backport branches that already included the original change can use
116+
auto-backport in CI or cherry-pick the updated transport version. Backport
117+
branches that did not include the original change need to cherry-pick both the
118+
original change and the updated transport version. For example, with the above
119+
change that is first backported to `9.1`, and subsequently added to `8.19`, the
120+
sequence of events would look like the following:
121+
122+
1. Create a pull request with target branch `main` for a new change
123+
(`C0`) with a newly created transport version (`TV`) required by `C0`
124+
1. Use the `github` labels `auto-backport` and `branch:9.1` to backport `C0`
125+
and `TV` into the target branch `9.1`.
126+
2. Discover that `C0` is also required in target branch `8.19`.
127+
3. Create a pull request with target branch `main` for a change (`C1`) to only
128+
update `TV` to include `8.19`
129+
1. Use the gradle task
130+
`./gradlew generateTransportVersion --name=my_tv
131+
--backport-branches=9.1,8.19`
132+
to update `TV` to include `8.19`
133+
2. Use the `github` labels `auto-backport`, `branch:9.1`, and `branch:8.19`
134+
to backport `C1` and updated `TV` into the target branches `9.1` and `8.19`.
135+
This creates a source branch for `8.19` (`SB819`) that does not contain `C0`.
136+
3. Cherry-pick `C0` into the source branch `SB819`
137+
138+
Note there are several ways to achieve the desired end state. This
139+
specific example takes advantage of the available CI tooling to simplify the
140+
process.
115141

116142
### Resolving merge conflicts
117143

libs/native/libraries/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ configurations {
1919
}
2020

2121
var zstdVersion = "1.5.5"
22-
var vecVersion = "1.0.14"
22+
var vecVersion = "1.0.13"
2323

2424
repositories {
2525
exclusiveContent {

libs/native/src/main/java/org/elasticsearch/nativeaccess/VectorSimilarityFunctions.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ public interface VectorSimilarityFunctions {
3030
*/
3131
MethodHandle dotProductHandle7u();
3232

33-
MethodHandle dotProductHandle7uBulk();
34-
3533
/**
3634
* Produces a method handle returning the square distance of byte (unsigned int7) vectors.
3735
*

libs/native/src/main/java/org/elasticsearch/nativeaccess/jdk/JdkVectorLibrary.java

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public final class JdkVectorLibrary implements VectorLibrary {
3232
static final Logger logger = LogManager.getLogger(JdkVectorLibrary.class);
3333

3434
static final MethodHandle dot7u$mh;
35-
static final MethodHandle dot7uBulk$mh;
3635
static final MethodHandle sqr7u$mh;
3736
static final MethodHandle cosf32$mh;
3837
static final MethodHandle dotf32$mh;
@@ -54,11 +53,6 @@ public final class JdkVectorLibrary implements VectorLibrary {
5453
FunctionDescriptor.of(JAVA_INT, ADDRESS, ADDRESS, JAVA_INT),
5554
LinkerHelperUtil.critical()
5655
);
57-
dot7uBulk$mh = downcallHandle(
58-
"dot7u_bulk_2",
59-
FunctionDescriptor.ofVoid(ADDRESS, ADDRESS, JAVA_INT, JAVA_INT, ADDRESS),
60-
LinkerHelperUtil.critical()
61-
);
6256
sqr7u$mh = downcallHandle(
6357
"sqr7u_2",
6458
FunctionDescriptor.of(JAVA_INT, ADDRESS, ADDRESS, JAVA_INT),
@@ -85,11 +79,6 @@ public final class JdkVectorLibrary implements VectorLibrary {
8579
FunctionDescriptor.of(JAVA_INT, ADDRESS, ADDRESS, JAVA_INT),
8680
LinkerHelperUtil.critical()
8781
);
88-
dot7uBulk$mh = downcallHandle(
89-
"dot7u_bulk",
90-
FunctionDescriptor.ofVoid(ADDRESS, ADDRESS, JAVA_INT, JAVA_INT, ADDRESS),
91-
LinkerHelperUtil.critical()
92-
);
9382
sqr7u$mh = downcallHandle(
9483
"sqr7u",
9584
FunctionDescriptor.of(JAVA_INT, ADDRESS, ADDRESS, JAVA_INT),
@@ -119,7 +108,6 @@ public final class JdkVectorLibrary implements VectorLibrary {
119108
enable them in your OS/Hypervisor/VM/container""");
120109
}
121110
dot7u$mh = null;
122-
dot7uBulk$mh = null;
123111
sqr7u$mh = null;
124112
cosf32$mh = null;
125113
dotf32$mh = null;
@@ -154,10 +142,6 @@ static int dotProduct7u(MemorySegment a, MemorySegment b, int length) {
154142
return dot7u(a, b, length);
155143
}
156144

157-
static void dotProduct7uBulk(MemorySegment a, MemorySegment b, int length, int count, MemorySegment result) {
158-
dot7uBulk(a, b, length, count, result);
159-
}
160-
161145
/**
162146
* Computes the square distance of given unsigned int7 byte vectors.
163147
*
@@ -226,14 +210,6 @@ private static int dot7u(MemorySegment a, MemorySegment b, int length) {
226210
}
227211
}
228212

229-
private static void dot7uBulk(MemorySegment a, MemorySegment b, int length, int count, MemorySegment result) {
230-
try {
231-
JdkVectorLibrary.dot7uBulk$mh.invokeExact(a, b, length, count, result);
232-
} catch (Throwable t) {
233-
throw new AssertionError(t);
234-
}
235-
}
236-
237213
private static int sqr7u(MemorySegment a, MemorySegment b, int length) {
238214
try {
239215
return (int) JdkVectorLibrary.sqr7u$mh.invokeExact(a, b, length);
@@ -267,7 +243,6 @@ private static float sqrf32(MemorySegment a, MemorySegment b, int length) {
267243
}
268244

269245
static final MethodHandle DOT_HANDLE_7U;
270-
static final MethodHandle DOT_HANDLE_7U_BULK;
271246
static final MethodHandle SQR_HANDLE_7U;
272247
static final MethodHandle COS_HANDLE_FLOAT32;
273248
static final MethodHandle DOT_HANDLE_FLOAT32;
@@ -278,11 +253,6 @@ private static float sqrf32(MemorySegment a, MemorySegment b, int length) {
278253
var lookup = MethodHandles.lookup();
279254
var mt = MethodType.methodType(int.class, MemorySegment.class, MemorySegment.class, int.class);
280255
DOT_HANDLE_7U = lookup.findStatic(JdkVectorSimilarityFunctions.class, "dotProduct7u", mt);
281-
DOT_HANDLE_7U_BULK = lookup.findStatic(
282-
JdkVectorSimilarityFunctions.class,
283-
"dotProduct7uBulk",
284-
MethodType.methodType(void.class, MemorySegment.class, MemorySegment.class, int.class, int.class, MemorySegment.class)
285-
);
286256
SQR_HANDLE_7U = lookup.findStatic(JdkVectorSimilarityFunctions.class, "squareDistance7u", mt);
287257

288258
mt = MethodType.methodType(float.class, MemorySegment.class, MemorySegment.class, int.class);
@@ -299,11 +269,6 @@ public MethodHandle dotProductHandle7u() {
299269
return DOT_HANDLE_7U;
300270
}
301271

302-
@Override
303-
public MethodHandle dotProductHandle7uBulk() {
304-
return DOT_HANDLE_7U_BULK;
305-
}
306-
307272
@Override
308273
public MethodHandle squareDistanceHandle7u() {
309274
return SQR_HANDLE_7U;

libs/simdvec/src/main21/java/org/elasticsearch/simdvec/internal/Similarities.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,8 @@ public class Similarities {
2222
.orElseThrow(AssertionError::new);
2323

2424
static final MethodHandle DOT_PRODUCT_7U = DISTANCE_FUNCS.dotProductHandle7u();
25-
static final MethodHandle DOT_PRODUCT_7U_BULK = DISTANCE_FUNCS.dotProductHandle7uBulk();
2625
static final MethodHandle SQUARE_DISTANCE_7U = DISTANCE_FUNCS.squareDistanceHandle7u();
2726

28-
static void dotProduct7uBulk(MemorySegment a, MemorySegment b, int length, int count, MemorySegment scores) {
29-
try {
30-
DOT_PRODUCT_7U_BULK.invokeExact(a, b, length, count, scores);
31-
} catch (Throwable e) {
32-
if (e instanceof Error err) {
33-
throw err;
34-
} else if (e instanceof RuntimeException re) {
35-
throw re;
36-
} else {
37-
throw new RuntimeException(e);
38-
}
39-
}
40-
}
41-
4227
static int dotProduct7u(MemorySegment a, MemorySegment b, int length) {
4328
try {
4429
return (int) DOT_PRODUCT_7U.invokeExact(a, b, length);

0 commit comments

Comments
 (0)