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
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ public abstract class ReplicationRequest<Request extends ReplicationRequest<Requ
implements
IndicesRequest {

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

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

Expand Down Expand Up @@ -126,14 +129,16 @@ public ReplicationRequest(@Nullable ShardId shardId, int reshardSplitShardCountS
index = in.readString();
}
routedBasedOnClusterVersion = in.readVLong();
if (in.getTransportVersion().supports(INDEX_RESHARD_SHARDCOUNT_SUMMARY)) {
if (thinRead) {
this.reshardSplitShardCountSummary = reshardSplitShardCountSummary;
} else {
if (thinRead) {
this.reshardSplitShardCountSummary = reshardSplitShardCountSummary;
} else {
if (in.getTransportVersion().supports(INDEX_RESHARD_SHARDCOUNT_SMALL)) {
this.reshardSplitShardCountSummary = in.readVInt();
} else if (in.getTransportVersion().supports(INDEX_RESHARD_SHARDCOUNT_SUMMARY)) {
this.reshardSplitShardCountSummary = in.readInt();
} else {
this.reshardSplitShardCountSummary = 0;
}
} else {
this.reshardSplitShardCountSummary = 0;
}
}

Expand Down Expand Up @@ -262,7 +267,9 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeTimeValue(timeout);
out.writeString(index);
out.writeVLong(routedBasedOnClusterVersion);
if (out.getTransportVersion().supports(INDEX_RESHARD_SHARDCOUNT_SUMMARY)) {
if (out.getTransportVersion().supports(INDEX_RESHARD_SHARDCOUNT_SMALL)) {
out.writeVInt(reshardSplitShardCountSummary);
} else if (out.getTransportVersion().supports(INDEX_RESHARD_SHARDCOUNT_SUMMARY)) {
out.writeInt(reshardSplitShardCountSummary);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9181000
2 changes: 1 addition & 1 deletion server/src/main/resources/transport/upper_bounds/9.2.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
elastic_reranker_chunking_configuration,9180000
index_reshard_shardcount_small,9181000