-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Clarify the behavior of remote/info and resolve/cluster for connected status of remotes #118993
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
Changes from 4 commits
0af647e
4e08de4
5b9e749
fd48388
d3d5d6e
277d334
be35beb
53c0b54
496586e
b77477c
d5fd9bb
405aeb8
45bb773
0d4958a
84ff8e9
d8dfa44
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,9 @@ with this endpoint. | |
|
||
For each cluster in the index expression, information is returned about: | ||
|
||
1. whether the querying ("local") cluster is currently connected to each remote cluster | ||
in the index expression scope | ||
1. whether the querying ("local") cluster was able to connect to each remote cluster | ||
specified in the index expression. Note that this endpoint actively attempts to | ||
contact the remote clusters, unlike the <<cluster-remote-info,remote/info>> endpoint. | ||
2. whether each remote cluster is configured with `skip_unavailable` as `true` or `false` | ||
3. whether there are any indices, aliases or data streams on that cluster that match | ||
the index expression | ||
|
@@ -112,11 +113,24 @@ deprecated:[7.16.0] | |
|
||
[discrete] | ||
[[usecases-for-resolve-cluster]] | ||
=== Test availability of remote clusters | ||
|
||
The <<cluster-remote-info,remote/info>> endpoint is commonly used to test whether the "local" | ||
cluster (the cluster being queried) is connected to its remote clusters, but it does not | ||
necessarily reflect whether the remote cluster is available or not. The remote cluster may | ||
be available, while the local cluster is not currently connected to it. | ||
|
||
You can use this API to force a reconnection (for example with `GET _resolve/cluster/*:*`) and | ||
the `connected` field in the response will indicate whether it was successful or not. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This still isn't true given the (IMO misguided) move to using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks David. Pawan and I discussed this last week and came to a similar conclusion. We're going to revert #119516 in favor of another approach. We identified a couple of options and Pawan is going to follow up with the distributed team on some of the options that are thinking of. Once that's decided, I'll revise this PR according to the new model. |
||
If a connection was (re-)established, this will also cause the | ||
<<cluster-remote-info,remote/info>> endpoint to now indicate a connected status. | ||
|
||
|
||
=== Advantages of using this endpoint before a {ccs} | ||
|
||
You may want to exclude a cluster or index from a search when: | ||
|
||
1. A remote cluster is not currently connected and is configured with `skip_unavailable`=`false`. | ||
1. A remote cluster could not be connected to and is configured with `skip_unavailable`=`false`. | ||
Executing a {ccs} under those conditions will cause | ||
<<cross-cluster-search-failures,the entire search to fail>>. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that #119516 means this is no longer true.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even with 119516, if the cluster can be connected to it will reset the connected status so that the _remote/info endpoint will report
connected: true
, right?So perhaps the phrase "force a reconnection" is misleading. It will attempt a reconnection and if successful, the _remote/info status will now be refreshed. Would that be the better wording for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified the wording in this commit.