-
Notifications
You must be signed in to change notification settings - Fork 25k
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
GET index/_settings?include_defaults returns the wrong default value for settings with default values dependent on other settings #47890
Comments
Pinging @elastic/es-core-infra (:Core/Infra/Settings) |
In particular, I think this line is the problem: Line 108 in 2488214
Specifically, the |
+1 The CCR docs indicate that since this is default, nothing else is required if you have 7.X indices. However, no replication starts until you explicitly set |
@ajoliveira I believed this was a cosmetic bug - i.e. the underlying setting is If you need to explicitly set the setting when creating an index for CCR to work, especially if CCR just silently doesn't work, you may have discovered a different (and much more severe) bug. Do you have reproduction steps? |
To reproduce:
Hope that helps. |
@ajoliveira I'm not able to reproduce the issue, although I admit I've been trying with regular indices, rather than with monitoring for simplicity's sake (though I did use the index settings from the monitoring template). I do note that you enabled monitoring prior to creating the auto-follow pattern, but per the docs auto-follow patterns only follow new indices:
That would explain why you see the follower index show up when deleting and re-creating the monitoring index. Are you sure that isn't the root cause of the issue? |
@gwbrown Doh! You are right, appears I overlooked that and when I came across this bug, thought it was the root cause of the issue. I reset everything on my system and see that follower indices are created correctly even with soft_deletes showing incorrectly. Apologies for side tracking this. |
The Get Index Settings API returns the wrong default for
index.soft_deletes.enabled
in the 7.x series.This is because the default is computed based on the version the index was created in:
elasticsearch/server/src/main/java/org/elasticsearch/index/IndexSettings.java
Lines 233 to 235 in 2488214
But the version is not included in the Settings object passed to the default calculation function when called by the Get Index Settings API with the
include_defaults
flag. It looks like the Settings object passed to calculate the defaults in this circumstance is always empty, so any setting whose defaults depend on another setting is likely to be wrong as well.Update:
This definitely impacts other settings, as can be seen in #51194 where an incorrect default value of
index.merge.scheduler.max_merge_count
is returned fromGET index/settings?include_defaults
because its default value depends on the value ofindex.merge.scheduler.max_thread_count
.The text was updated successfully, but these errors were encountered: