Skip to content

Commit dba71de

Browse files
Merge branch 'main' into es-gpu
2 parents 543fafe + daf5ddc commit dba71de

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,9 +591,6 @@ tests:
591591
- class: org.elasticsearch.xpack.esql.qa.multi_node.GenerativeIT
592592
method: test
593593
issue: https://github.com/elastic/elasticsearch/issues/134407
594-
- class: org.elasticsearch.action.admin.cluster.stats.SearchUsageStatsTests
595-
method: testToXContent
596-
issue: https://github.com/elastic/elasticsearch/issues/135558
597594
- class: org.elasticsearch.cluster.routing.allocation.decider.RestoreInProgressAllocationDeciderTests
598595
method: testCanAllocatePrimaryExistingInRestoreInProgress
599596
issue: https://github.com/elastic/elasticsearch/issues/135566

server/src/main/java/org/elasticsearch/action/admin/cluster/stats/SearchUsageStats.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public SearchUsageStats() {
5151
this.sections = new HashMap<>();
5252
this.rescorers = new HashMap<>();
5353
this.retrievers = new HashMap<>();
54-
this.extendedSearchUsageStats = ExtendedSearchUsageStats.EMPTY;
54+
this.extendedSearchUsageStats = new ExtendedSearchUsageStats();
5555
}
5656

5757
/**

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+
9181000
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
elastic_reranker_chunking_configuration,9180000
1+
index_reshard_shardcount_small,9181000

0 commit comments

Comments
 (0)