-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Reject RECONNECT_UNLESS_SKIP_UNAVAILABLE
in CPS
#132955
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
Reject RECONNECT_UNLESS_SKIP_UNAVAILABLE
in CPS
#132955
Conversation
DisconnectedStrategy.RECONNECT_UNLESS_SKIP_UNAVAILABLE is unsupported in CPS, as skip_unavailable itself is unsupported in CPS. This change adds a check in RemoteClusterService.getRemoteClusterClient() rejecting RECONNECT_UNLESS_SKIP_UNAVAILABLE if stateless is enabled and adds a unit test case for it. Resolves: ES-12610
Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination) |
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.
I wonder whether this change is absolutely necessary. Please correct me if I am wrong: technically it feels OK to use the RECONNECT_UNLESS_SKIP_UNAVAILABLE
strategy in stateless? Since stateless has isSkipUnavailable
fixed to true
all the time, using this strategy means "do not attempt to reconnect". This seems semantically correct to me. Of course if the callers want to reconnect, a different strategy needs to be used and that is up to the caller. So the actual constraint here is the fixed isSkipUnavailable
value. If this is well understood by both us and the search side, it seems OK that we can just leave the strategy as is?
if (isStateless && disconnectedStrategy == DisconnectedStrategy.RECONNECT_UNLESS_SKIP_UNAVAILABLE) { | ||
final var message = "DisconnectedStrategy [" | ||
+ DisconnectedStrategy.RECONNECT_UNLESS_SKIP_UNAVAILABLE | ||
+ "] is not supported in stateless environments"; | ||
assert false : message; |
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.
We talked about deferring this change until search side has made its changes. But I guess it's OK to proceed here because the condition is guarded with isStateless
?
Yes, we can close this out, Pawan is aligned here too, we talked about this when he was working on #132927. |
DisconnectedStrategy.RECONNECT_UNLESS_SKIP_UNAVAILABLE
is unsupported in CPS, asskip_unavailable
itself is unsupported in CPS. This change adds a check inRemoteClusterService.getRemoteClusterClient()
rejectingRECONNECT_UNLESS_SKIP_UNAVAILABLE
if stateless is enabled and adds a unit test case for it. This PR is a split from work initially done in #132478.Resolves: ES-12610