Skip to content

Conversation

JeremyDahlgren
Copy link
Contributor

@JeremyDahlgren JeremyDahlgren commented Aug 5, 2025

In serverless cross-project search (CPS)skip_unavailable will not be used and should always be
true. This PR adds a settings validator that rejects setting skip_unavailable when CPS is enabled.

Resolves: ES-12267

@JeremyDahlgren JeremyDahlgren added Team:Distributed Coordination Meta label for Distributed Coordination team :Distributed Coordination/Distributed A catch all label for anything in the Distributed Coordination area. Please avoid if you can. v9.2.0 labels Aug 5, 2025
In stateless CPS skip_unavailable will not be used and should always be
true.  Also DisconnectedStrategy.RECONNECT_UNLESS_SKIP_UNAVAILABLE is
rejected in CPS as a parameter value for getRemoteClusterClient().

Resolves: ES-12267
@JeremyDahlgren JeremyDahlgren force-pushed the tasks/es-12267-skip-unavailable-for-cps branch from 5510b9d to c1cd712 Compare August 7, 2025 17:08
@JeremyDahlgren JeremyDahlgren requested a review from ywangd August 7, 2025 17:10
@JeremyDahlgren JeremyDahlgren marked this pull request as ready for review August 7, 2025 17:10
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination)

Copy link
Member

@ywangd ywangd left a comment

Choose a reason for hiding this comment

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

I have a question for the validation.

@JeremyDahlgren
Copy link
Contributor Author

I'll need to split this into separate PRs. We can make the skip_unavailable settings change now, but the client call change for DisconnectedStrategy.RECONNECT_UNLESS_SKIP_UNAVAILABLE is dependent on corresponding client usage changes in serverless.

@elasticsearchmachine elasticsearchmachine added the serverless-linked Added by automation, don't add manually label Aug 9, 2025
Copy link
Member

@ywangd ywangd left a comment

Choose a reason for hiding this comment

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

LGTM

}
};

private static class UnsupportedInStatelessValidator<T> extends RemoteConnectionEnabled<T> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use "serverless" rather than "stateless"? We typically use the terms "stateful" vs. "serverless", so when I see "stateless" I think have to take a moment to parse what it means since the first half of the word feels like one and the second half like the other.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I see why you used it - because of the pre-existing DiscoveryNode.STATELESS_ENABLED_SETTING_NAME. In that case, I guess it makes sense to keep using "stateless" here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switch to CPS in the name since the RemoteClusterService and related code all now test the CPS specific setting.

@JeremyDahlgren JeremyDahlgren removed the serverless-linked Added by automation, don't add manually label Oct 7, 2025
@JeremyDahlgren JeremyDahlgren merged commit 8c4eee6 into elastic:main Oct 8, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Coordination/Distributed A catch all label for anything in the Distributed Coordination area. Please avoid if you can. >non-issue Team:Distributed Coordination Meta label for Distributed Coordination team v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants