Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CcrRepository to init follower index (#35719) #37988

Merged
merged 6 commits into from
Jan 31, 2019

Conversation

Tim-Brooks
Copy link
Contributor

This commit modifies the put follow index action to use a
CcrRepository when creating a follower index. It routes
the logic through the snapshot/restore process. A
wait_for_active_shards parameter can be used to configure
how long to wait before returning the response.

This commit modifies the put follow index action to use a
CcrRepository when creating a follower index. It routes
the logic through the snapshot/restore process. A
wait_for_active_shards parameter can be used to configure
how long to wait before returning the response.
@Tim-Brooks Tim-Brooks added >non-issue :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features backport v6.7.0 labels Jan 29, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@Tim-Brooks
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/2

1 similar comment
@Tim-Brooks
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/2

@Tim-Brooks Tim-Brooks requested a review from ywelsch January 30, 2019 18:30
@Tim-Brooks
Copy link
Contributor Author

@ywelsch I added a pre-6.7 put follow mode. The code is copied from the prior TransportPutFollowAction.

Copy link
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.

I've only reviewed eea717e (the extra changes for 6.7) and left 2 comments.

@@ -134,7 +135,7 @@ public void checkRemoteClusterLicenseAndFetchLeaderIndexMetadataAndHistoryUUIDs(
hasPrivilegesToFollowIndices(remoteClient, new String[] {leaderIndex}, e -> {
if (e == null) {
fetchLeaderHistoryUUIDs(remoteClient, leaderIndexMetaData, onFailure, historyUUIDs ->
consumer.accept(historyUUIDs, leaderIndexMetaData));
consumer.accept(historyUUIDs, new Tuple<>(remoteClusterState, leaderIndexMetaData)));
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't you need to set .nodes(true) on the cluster state request in order to get the minNodeVersion? Why is this not failing any tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nodes defaults to true. But I will set it explicitly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh well I see that we set clear() which should reset it. I'll investigate why the test did not fail.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason that the test was passing (I believe based on reproductions locally) is that the rolling upgrade uses the local cluster as the remote cluster. So the check that your local cluster was mixed with pre-6.7 was pushing us to use compatibility mode. I changed the remote cluster state request to request nodes(true).

This does raise questions about testing, do we need to invest in rolling upgrade tests that use two different cluster and have a test where your local cluster is all 6.7 and the remote cluster is mixed?

@Tim-Brooks
Copy link
Contributor Author

@ywelsch - updates in 34a8879

@Tim-Brooks Tim-Brooks requested a review from ywelsch January 31, 2019 00:26
@Tim-Brooks
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/2

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

LGTM

import java.util.HashMap;
import java.util.Map;

final class Pre67PutFollow {
Copy link
Member

Choose a reason for hiding this comment

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

👍 too easy to forget about bwc.
Did you notice the ccr tests in rolling upgrade tests fail when this was missing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Not always but sometimes.

Copy link
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

@Tim-Brooks Tim-Brooks merged commit e73140e into elastic:6.x Jan 31, 2019
@Tim-Brooks Tim-Brooks deleted the backport_follow_through_repo branch April 30, 2020 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features >non-issue v6.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants