Skip to content

Snapshot Stability Fixes#39502

Merged
original-brownbear merged 2 commits intoelastic:6.7from
original-brownbear:backport-snapshot-fixes-6.7
Mar 1, 2019
Merged

Snapshot Stability Fixes#39502
original-brownbear merged 2 commits intoelastic:6.7from
original-brownbear:backport-snapshot-fixes-6.7

Conversation

@original-brownbear
Copy link
Copy Markdown
Contributor

@original-brownbear original-brownbear added >bug :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs backport labels Feb 28, 2019
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will have to mute BwC tests before merging this and then adjust this version to 6.7 in master afterwards, currently we have a 7.0.0 here in master.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will have to mute BwC tests before merging this and then adjust this version to 6.7 in master afterwards, currently we have a 7.0.0 here in master.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

passing the settings here (we don't have that argument in master anymore) is the only difference between this PR and master in this file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class should be exactly like it is in master now

@original-brownbear original-brownbear removed the request for review from ywelsch February 28, 2019 11:08
@original-brownbear
Copy link
Copy Markdown
Contributor Author

seems I missed a bwc spot, looking into it now

* Backport of various snapshot stability fixes from `master` to `6.7`
* Includes #38368, #38025 and #37612
Copy link
Copy Markdown
Contributor Author

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ywelsch Added some notes and fixed BwC here now, should be good to review :)

final DiscoveryNode masterNode) {
void sendSnapshotShardUpdate(Snapshot snapshot, ShardId shardId, ShardSnapshotStatus status, DiscoveryNode masterNode) {
try {
if (masterNode.getVersion().onOrAfter(Version.V_6_1_0)) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I simply made it a hard condition here between the old and the new path, the old path doesn't use the de-duplicator.
I figured the optimization isn't really important in the rolling upgrade case and this makes future backports a lot easier than having the conditionals for that in the old code, right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

logger.debug("[{}] new master thinks the shard [{}] is not completed but the shard is done locally, " +
"updating status on the master", snapshot.snapshot(), shardId);
notifySuccessfulSnapshotShard(snapshot.snapshot(), shardId, localNodeId, masterNode);
notifySuccessfulSnapshotShard(snapshot.snapshot(), shardId, masterNode);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All this passing down of masterNode is different from the 7.x/master version since we need the Bwc path in the status update sending below.

Copy link
Copy Markdown
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ywelsch ywelsch added the v6.7.0 label Mar 1, 2019
@original-brownbear
Copy link
Copy Markdown
Contributor Author

@ywelsch thanks!

@original-brownbear original-brownbear merged commit 4b725e0 into elastic:6.7 Mar 1, 2019
@original-brownbear original-brownbear deleted the backport-snapshot-fixes-6.7 branch March 1, 2019 09:11
original-brownbear added a commit that referenced this pull request Mar 1, 2019
original-brownbear added a commit that referenced this pull request Mar 1, 2019
original-brownbear added a commit that referenced this pull request Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport >bug :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v6.7.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants