Deprecation check for : in Cluster/Index name#36185
Conversation
Adds a deprecation check for cluster and index names that contain `:`, which is illegal in 7.0.
|
Pinging @elastic/es-core-features |
| int currentOpenShards = state.getMetaData().getTotalOpenIndexShards(); | ||
|
|
||
| if (currentOpenShards >= maxShardsInCluster) { | ||
| if (nodeCount != 0 && currentOpenShards >= maxShardsInCluster) { |
There was a problem hiding this comment.
This is a fix for bug that was revealed by the test for the new cluster-level deprecation check, but I sincerely doubt it would ever be hit in practice and I didn't think it was worth its own PR.
There was a problem hiding this comment.
nit: IMO nodeCount > 0 && ... reads better, else i am asking myself how this value can ever be negative.
| static DeprecationIssue indexNameCheck(IndexMetaData indexMetaData) { | ||
| String clusterName = indexMetaData.getIndex().getName(); | ||
| if (clusterName.contains(":")) { | ||
| return new DeprecationIssue(DeprecationIssue.Level.CRITICAL, |
There was a problem hiding this comment.
Is there guidance on what is Critical vs. Warning ?
There was a problem hiding this comment.
I believe Critical means "if you upgrade without fixing this your cluster will fail", whereas Warning means "you will get some deprecation warnings, and/or behavior probably won't be what you want".
This looks like it should be Critical for the cluster name but Warning for the index name - I'll fix that.
Adds a deprecation check for cluster and index names that contain
:,which is illegal in 7.0.
Relates to #36024 and #26247