Skip to content

Commit 7622303

Browse files
authored
Merge branch 'main' into fuse_out_of_snapshot
2 parents 39acec1 + 1c11b94 commit 7622303

File tree

26 files changed

+1242
-70
lines changed

26 files changed

+1242
-70
lines changed

docs/changelog/130485.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 130485
2+
summary: Add `RerankRequestChunker`
3+
area: Machine Learning
4+
type: enhancement
5+
issues: []

modules/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/TSDBIndexingIT.java

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -698,19 +698,13 @@ public void testAddDimensionToMapping() throws Exception {
698698
}
699699
""", XContentType.JSON);
700700
ActionFuture<AcknowledgedResponse> putMappingFuture = client().execute(TransportPutMappingAction.TYPE, putMappingRequest);
701-
if (INDEX_DIMENSIONS_TSID_OPTIMIZATION_FEATURE_FLAG) {
702-
IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, putMappingFuture::actionGet);
703-
assertThat(
704-
exception.getMessage(),
705-
containsString("Cannot add dynamic templates that define dimension fields on an existing index with index.dimensions")
706-
);
707-
assertThat(getSetting(dataStreamName, IndexMetadata.INDEX_DIMENSIONS), containsInAnyOrder("metricset", "k8s.pod.name"));
708-
assertThat(getSetting(dataStreamName, IndexMetadata.INDEX_ROUTING_PATH), empty());
709-
} else {
710-
assertAcked(putMappingFuture);
711-
assertThat(getSetting(dataStreamName, IndexMetadata.INDEX_ROUTING_PATH), containsInAnyOrder("metricset"));
712-
assertThat(getSetting(dataStreamName, IndexMetadata.INDEX_DIMENSIONS), empty());
713-
}
701+
IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, putMappingFuture::actionGet);
702+
assertThat(
703+
exception.getMessage(),
704+
containsString("Cannot add dynamic templates that define dimension fields on an existing index with index.dimensions")
705+
);
706+
assertThat(getSetting(dataStreamName, IndexMetadata.INDEX_DIMENSIONS), containsInAnyOrder("metricset", "k8s.pod.name"));
707+
assertThat(getSetting(dataStreamName, IndexMetadata.INDEX_ROUTING_PATH), empty());
714708
indexWithPodNames(dataStreamName, Instant.now(), Map.of(), "dog", "cat");
715709
}
716710

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -594,18 +594,12 @@ tests:
594594
- class: org.elasticsearch.action.admin.cluster.stats.SearchUsageStatsTests
595595
method: testToXContent
596596
issue: https://github.com/elastic/elasticsearch/issues/135558
597-
- class: org.elasticsearch.search.ccs.SparseVectorQueryBuilderCrossClusterSearchIT
598-
method: testSparseVectorQueryWithCcsMinimizeRoundTripsFalse
599-
issue: https://github.com/elastic/elasticsearch/issues/135559
600597
- class: org.elasticsearch.cluster.routing.allocation.decider.RestoreInProgressAllocationDeciderTests
601598
method: testCanAllocatePrimaryExistingInRestoreInProgress
602599
issue: https://github.com/elastic/elasticsearch/issues/135566
603600
- class: org.elasticsearch.xpack.esql.inference.textembedding.TextEmbeddingOperatorTests
604601
method: testSimpleCircuitBreaking
605602
issue: https://github.com/elastic/elasticsearch/issues/135569
606-
- class: org.elasticsearch.search.ccs.KnnVectorQueryBuilderCrossClusterSearchIT
607-
method: testKnnQueryWithCcsMinimizeRoundTripsFalse
608-
issue: https://github.com/elastic/elasticsearch/issues/135573
609603
- class: org.elasticsearch.multiproject.test.XpackWithMultipleProjectsClientYamlTestSuiteIT
610604
method: test {yaml=esql/60_usage/Basic ESQL usage output (telemetry) snapshot version}
611605
issue: https://github.com/elastic/elasticsearch/issues/135579

server/src/main/java/org/elasticsearch/action/support/replication/ReplicationRequest.java

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ public abstract class ReplicationRequest<Request extends ReplicationRequest<Requ
3838
implements
3939
IndicesRequest {
4040

41+
// superseded
4142
private static final TransportVersion INDEX_RESHARD_SHARDCOUNT_SUMMARY = TransportVersion.fromName("index_reshard_shardcount_summary");
43+
// bumped to use VInt instead of Int
44+
private static final TransportVersion INDEX_RESHARD_SHARDCOUNT_SMALL = TransportVersion.fromName("index_reshard_shardcount_small");
4245

4346
public static final TimeValue DEFAULT_TIMEOUT = TimeValue.timeValueMinutes(1);
4447

@@ -126,14 +129,16 @@ public ReplicationRequest(@Nullable ShardId shardId, int reshardSplitShardCountS
126129
index = in.readString();
127130
}
128131
routedBasedOnClusterVersion = in.readVLong();
129-
if (in.getTransportVersion().supports(INDEX_RESHARD_SHARDCOUNT_SUMMARY)) {
130-
if (thinRead) {
131-
this.reshardSplitShardCountSummary = reshardSplitShardCountSummary;
132-
} else {
132+
if (thinRead) {
133+
this.reshardSplitShardCountSummary = reshardSplitShardCountSummary;
134+
} else {
135+
if (in.getTransportVersion().supports(INDEX_RESHARD_SHARDCOUNT_SMALL)) {
136+
this.reshardSplitShardCountSummary = in.readVInt();
137+
} else if (in.getTransportVersion().supports(INDEX_RESHARD_SHARDCOUNT_SUMMARY)) {
133138
this.reshardSplitShardCountSummary = in.readInt();
139+
} else {
140+
this.reshardSplitShardCountSummary = 0;
134141
}
135-
} else {
136-
this.reshardSplitShardCountSummary = 0;
137142
}
138143
}
139144

@@ -262,7 +267,9 @@ public void writeTo(StreamOutput out) throws IOException {
262267
out.writeTimeValue(timeout);
263268
out.writeString(index);
264269
out.writeVLong(routedBasedOnClusterVersion);
265-
if (out.getTransportVersion().supports(INDEX_RESHARD_SHARDCOUNT_SUMMARY)) {
270+
if (out.getTransportVersion().supports(INDEX_RESHARD_SHARDCOUNT_SMALL)) {
271+
out.writeVInt(reshardSplitShardCountSummary);
272+
} else if (out.getTransportVersion().supports(INDEX_RESHARD_SHARDCOUNT_SUMMARY)) {
266273
out.writeInt(reshardSplitShardCountSummary);
267274
}
268275
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9180000
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9181000
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ml_inference_google_model_garden_added,9179000
1+
index_reshard_shardcount_small,9181000

test/framework/build.gradle

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,29 @@
1010
apply plugin: 'elasticsearch.build'
1111
apply plugin: 'elasticsearch.publish'
1212

13-
configurations {
14-
// we do not want to expose a version conflict in transitive dependencies by
15-
// bringing in different versions of hamcrest and hamcrest-core.
16-
// Therefore we exclude transitive deps on hamcrest-core here as we have a direct
17-
// dependency on a newer version.
18-
runtimeElements {
19-
exclude group: 'org.hamcrest', module: 'hamcrest-core'
20-
}
21-
}
2213
dependencies {
2314
api project(":client:rest")
2415
api project(':modules:transport-netty4')
2516
api project(':libs:ssl-config')
2617
api project(":server")
2718
api project(":libs:cli")
2819
api project(":libs:entitlement:bridge")
29-
api "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
30-
api("junit:junit:${versions.junit}") {
31-
// exclude group: 'org.hamcrest'
20+
api ("com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}") {
21+
exclude group: "junit", module: "junit"
3222
}
23+
24+
// we do not want to expose a version conflict in transitive dependencies by
25+
// bringing in different versions of dependencies.
26+
// Therefore we exclude mismatches in our transitive dependencies explicitly.
27+
// This also avoids jarHell issues with different hamcrest related dependencies
28+
// like hamcrest and hamcrest-core
3329
api "org.hamcrest:hamcrest:${versions.hamcrest}"
30+
api("junit:junit:${versions.junit}") {
31+
exclude group: 'org.hamcrest', module: 'hamcrest-core'
32+
}
3433
api("org.apache.lucene:lucene-test-framework:${versions.lucene}") {
35-
// exclude group: 'org.hamcrest'
34+
exclude group: "junit", module: "junit"
35+
exclude group: 'com.carrotsearch.randomizedtesting', module: 'randomizedtesting-runner'
3636
}
3737
api "org.apache.lucene:lucene-codecs:${versions.lucene}"
3838
api "commons-logging:commons-logging:${versions.commonslogging}"

test/test-clusters/src/main/java/org/elasticsearch/test/cluster/FeatureFlag.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public enum FeatureFlag {
2525
"es.index_dimensions_tsid_optimization_feature_flag_enabled=true",
2626
Version.fromString("9.2.0"),
2727
null
28-
);
28+
),
29+
ELASTIC_RERANKER_CHUNKING("es.elastic_reranker_chunking_long_documents=true", Version.fromString("9.2.0"), null);
2930

3031
public final String systemProperty;
3132
public final Version from;

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/DocumentSubsetBitsetCache.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838

3939
import java.io.Closeable;
4040
import java.io.IOException;
41-
import java.util.Collections;
4241
import java.util.LinkedHashMap;
4342
import java.util.List;
4443
import java.util.Map;
@@ -316,7 +315,7 @@ public Map<String, Object> usageStats() {
316315
stats.put("evictions", cacheStats.getEvictions());
317316
stats.put("hits_time_in_millis", TimeValue.nsecToMSec(hitsTimeInNanos.sum()));
318317
stats.put("misses_time_in_millis", TimeValue.nsecToMSec(missesTimeInNanos.sum()));
319-
return Collections.unmodifiableMap(stats);
318+
return stats;
320319
}
321320

322321
private static final class BitsetCacheKey {

0 commit comments

Comments
 (0)