-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Move per-project settings out of ProjectMetadata #129068
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
Conversation
|
Hi @alexey-ivanov-es, I've created a changelog YAML for you. |
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
| public static final TransportVersion ILM_ADD_SKIP_SETTING = def(9_089_0_00); | ||
| public static final TransportVersion ML_INFERENCE_MISTRAL_CHAT_COMPLETION_ADDED = def(9_090_0_00); | ||
| public static final TransportVersion IDP_CUSTOM_SAML_ATTRIBUTES_ALLOW_LIST = def(9_091_0_00); | ||
| public static final TransportVersion CLUSTER_STATE_PROJECTS_SETTINGS = def(9_092_0_00); |
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.
Do we actually need to introduce a new transport version here? The per-project stuff was never included in a stack release, and even in serverless it's behind the multi-project flag which isn't enabled in any production environment. I believe it's safe to remove this w/o introducing a new transport version.
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.
@rjernst is my logic sound here?
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.
Maybe. I think the problem is when the feature flag is removed, a transport version would need to be introduced. Adding it here seems safer.
| } | ||
|
|
||
| private static ClusterState buildMultiProjectClusterState(DiscoveryNode... nodes) { | ||
| ProjectId projectId1 = ProjectId.fromId("3LftaL7hgfXAsF60Gm6jcD"); |
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 can use randomProjectIdOrDefault() or randomUniqueProjectId() here instead of hard-coding values.
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.
This project-id is used in the serialized form of cluster state - using a random id would require generating the expected string, and I don't think it's worth it
mark-vieira
left a comment
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.
Some minor nits but otherwise LGTM.
server/src/main/java/org/elasticsearch/cluster/project/ProjectsStateRegistry.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/project/ProjectsStateRegistry.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/project/ProjectsStateRegistry.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/project/ProjectsStateRegistry.java
Show resolved
Hide resolved
|
Changes LGTM. |
To better support project restoration after deletion, this change moves project Settings from ProjectMetadata to the new custom in the ClusterState. It also introduces a new transport version for cluster state serialization. Reserved cluster state for project settings remains within ProjectMetadata. Note: In mixed-version multiproject clusters, this may cause existing settings for projects to temporarily disappear until all nodes have been upgraded and restarted.
To better support project restoration after deletion, this change moves project Settings from
ProjectMetadatato the new custom in theClusterState. It also introduces a new transport version for cluster state serialization. Reserved cluster state for project settings remains withinProjectMetadata.Note: In mixed-version multiproject clusters, this may cause existing settings for projects to temporarily disappear until all nodes have been upgraded and restarted.