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

Add the simple strategy to cluster settings #49414

Merged
merged 12 commits into from
Nov 22, 2019

Conversation

Tim-Brooks
Copy link
Contributor

This is related to #49067. This commit adds the simple connection
strategy settings and strategy mode setting to the cluster settings
registry. With these changes, the simple connection mode can be used.
Additionally, it adds validation to ensure that settings cannot be
misconfigured.

@Tim-Brooks Tim-Brooks added >enhancement :Distributed Coordination/Network Http and internode communication implementations v8.0.0 v7.6.0 labels Nov 21, 2019
@Tim-Brooks Tim-Brooks requested a review from ywelsch November 21, 2019 00:53
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/Network)

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.

Can you also add a REST test that successfully / unsuccessfully switches connection mode?

@Tim-Brooks
Copy link
Contributor Author

Can you also add a REST test that successfully / unsuccessfully switches connection mode?

Yes. I expanded the REST tests.

@Tim-Brooks Tim-Brooks requested a review from ywelsch November 21, 2019 17:40
@ywelsch
Copy link
Contributor

ywelsch commented Nov 22, 2019

@elasticmachine run elasticsearch-ci/2

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 left two comments, looking good o.w.

- match: {transient.cluster\.remote\.test_remote_cluster\.sniff\.seeds: $remote_ip}

- do:
search:
Copy link
Contributor

Choose a reason for hiding this comment

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

this might fail as switching the remote connection mode does not wait for 10 seconds for the new connections to be established. I think we should adapt the waiting logic to take this into account.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So you want me to just always wait? Setting aside the mode, any change to a remote cluster config through settings will involve the connection being torn down and rebuilt.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made a change in remote cluster service to always wait. The update method will complete the listener before returning if the connection is being destroyed or unchanged (meaning no wait.)

@Tim-Brooks Tim-Brooks requested a review from ywelsch November 22, 2019 16:57
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 7069045 into elastic:master Nov 22, 2019
Tim-Brooks added a commit that referenced this pull request Nov 25, 2019
This commit back ports three commits related to enabling the simple
connection strategy.

Allow simple connection strategy to be configured (#49066)

Currently the simple connection strategy only exists in the code. It
cannot be configured. This commit moves in the direction of allowing it
to be configured. It introduces settings for the addresses and socket
count. Additionally it introduces new settings for the sniff strategy
so that the more generic number of connections and seed node settings
can be deprecated.

The simple settings are not yet registered as the registration is
dependent on follow-up work to validate the settings.

Ensure at least 1 seed configured in remote test (#49389)

This fixes #49384. Currently when we select a random subset of seed
nodes from a list, it is possible for 0 seeds to be selected. This test
depends on at least 1 seed being selected.

Add the simple strategy to cluster settings (#49414)

This is related to #49067. This commit adds the simple connection
strategy settings and strategy mode setting to the cluster settings
registry. With these changes, the simple connection mode can be used.
Additionally, it adds validation to ensure that settings cannot be
misconfigured.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants