Skip to content

Commit 3d3506b

Browse files
Fix Snapshot BwC with Version 5.6.x (#39737)
* Fix Snapshot BwC with Version 5.6.x * We were sending the wrong snapshot shard status update format to 5.6 (but reading the correct version) so tests would fail with 5.6 masters but not with 5.6 nodes running against a 6.7 master * Closes #39721
1 parent beab8de commit 3d3506b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/src/main/java/org/elasticsearch/snapshots/SnapshotShardsService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,6 @@ private void notifyFailedSnapshotShard(Snapshot snapshot, ShardId shardId, Strin
514514
void sendSnapshotShardUpdate(Snapshot snapshot, ShardId shardId, ShardSnapshotStatus status, DiscoveryNode masterNode) {
515515
try {
516516
if (masterNode.getVersion().onOrAfter(Version.V_6_1_0)) {
517-
UpdateIndexShardSnapshotStatusRequest request = new UpdateIndexShardSnapshotStatusRequest(snapshot, shardId, status);
518-
transportService.sendRequest(transportService.getLocalNode(), UPDATE_SNAPSHOT_STATUS_ACTION_NAME, request, INSTANCE_SAME);
519-
} else {
520517
remoteFailedRequestDeduplicator.executeOnce(
521518
new UpdateIndexShardSnapshotStatusRequest(snapshot, shardId, status),
522519
new ActionListener<Void>() {
@@ -557,6 +554,9 @@ public String executor() {
557554
}
558555
})
559556
);
557+
} else {
558+
transportService.sendRequest(masterNode, UPDATE_SNAPSHOT_STATUS_ACTION_NAME_V6,
559+
new UpdateSnapshotStatusRequestV6(snapshot, shardId, status), INSTANCE_SAME);
560560
}
561561
} catch (Exception e) {
562562
logger.warn(() -> new ParameterizedMessage("[{}] [{}] failed to update snapshot state", snapshot, status), e);

0 commit comments

Comments
 (0)