Skip to content

Commit

Permalink
Fix Snapshot BwC with Version 5.6.x (#39737)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
original-brownbear authored Mar 6, 2019
1 parent beab8de commit 3d3506b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,6 @@ private void notifyFailedSnapshotShard(Snapshot snapshot, ShardId shardId, Strin
void sendSnapshotShardUpdate(Snapshot snapshot, ShardId shardId, ShardSnapshotStatus status, DiscoveryNode masterNode) {
try {
if (masterNode.getVersion().onOrAfter(Version.V_6_1_0)) {
UpdateIndexShardSnapshotStatusRequest request = new UpdateIndexShardSnapshotStatusRequest(snapshot, shardId, status);
transportService.sendRequest(transportService.getLocalNode(), UPDATE_SNAPSHOT_STATUS_ACTION_NAME, request, INSTANCE_SAME);
} else {
remoteFailedRequestDeduplicator.executeOnce(
new UpdateIndexShardSnapshotStatusRequest(snapshot, shardId, status),
new ActionListener<Void>() {
Expand Down Expand Up @@ -557,6 +554,9 @@ public String executor() {
}
})
);
} else {
transportService.sendRequest(masterNode, UPDATE_SNAPSHOT_STATUS_ACTION_NAME_V6,
new UpdateSnapshotStatusRequestV6(snapshot, shardId, status), INSTANCE_SAME);
}
} catch (Exception e) {
logger.warn(() -> new ParameterizedMessage("[{}] [{}] failed to update snapshot state", snapshot, status), e);
Expand Down

0 comments on commit 3d3506b

Please sign in to comment.