-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Remove hand-coded XContent duplicate checks #34588
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
Remove hand-coded XContent duplicate checks #34588
Conversation
With this commit we cleanup hand-coded duplicate checks in XContent parsing. They were necessary previously but since we reconfigured the underlying parser in elastic#22073 and elastic#22225, these checks are obsolete and were also ineffective unless an undocumented system property has been set. As we also remove this escape hatch, we can remove the additional checks as well. Closes elastic#22253
|
Pinging @elastic/es-core-infra |
|
Note to reviewers: I intentionally kept tests so we check that duplicates are indeed detected. |
I don't think we need to do this. This effectively amounts to unit tests of Jackson now that we defer to its behavior. I think a single test that each of the XContent parsers reject duplicates is sufficient, but we don't need to go to the individual uses of XContent parsers to test for duplicates. |
Fine for me. Then I'll remove these tests soon. For reference, the test that covers this is |
jasontedor
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.
LGTM.
nik9000
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.
LGTM2!
|
@elasticmachine test this please |
With this commit we cleanup hand-coded duplicate checks in XContent parsing. They were necessary previously but since we reconfigured the underlying parser in #22073 and #22225, these checks are obsolete and were also ineffective unless an undocumented system property has been set. As we also remove this escape hatch, we can remove the additional checks as well. Closes #22253 Relates #34588
The setting es.xcontent.strict_duplicate_detection was removed in 7.0 (see elastic#34588). It was an undocumented setting, but enough users relied on it that its absence is causing problems during upgrades. This commit adds a message to the deprecation log if this setting is present at startup.
#63500) * Add deprecation warning for removed setting The setting es.xcontent.strict_duplicate_detection was removed in 7.0 (see #34588). It was an undocumented setting, but enough users relied on it that its absence is causing problems during upgrades. This commit adds a message to the deprecation log if this setting is present at startup. * Spotless formatting * Avoid forbidden API * Reset between custom config tests * Spotless apply * Access system properties consistently * Revert changes to ConfigurationTests setup Co-authored-by: Elastic Machine <[email protected]>
With this commit we cleanup hand-coded duplicate checks in XContent
parsing. They were necessary previously but since we reconfigured the
underlying parser in #22073 and #22225, these checks are obsolete and
were also ineffective unless an undocumented system property has been
set. As we also remove this escape hatch, we can remove the additional
checks as well.
Closes #22253