Skip to content
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

Refactor DocValueFieldsFetchSubPhase use of deprecation logger #33572

Closed
tomcallahan opened this issue Sep 10, 2018 · 1 comment
Closed

Refactor DocValueFieldsFetchSubPhase use of deprecation logger #33572

tomcallahan opened this issue Sep 10, 2018 · 1 comment
Assignees
Labels

Comments

@tomcallahan
Copy link
Contributor

Elasticsearch version (bin/elasticsearch --version): 6.4.0

Description of the problem including expected versus actual behavior
In DocValueFieldsFetchSubPhase.java, we use the deprecation logger inside of a per-field loop, emitting a log message (and corresponding HTTP header) for each docvalue_fields item without a format parameter in an msearch query. For users running Elasticsearch behind a proxy, this has been breaking as we can emit potentially many of these headers as Kibana is used normally.

Here is an example of the offending deprecation log message:
#! Deprecation: Doc-value field [date2] is not using a format. The output will change in 7.0 when doc value fields get formatted based on mappings by default. It is recommended to pass [format=use_field_mapping] with the doc value field in order to opt in for the future behaviour and ease the migration to 7.0.

We should refactor this class so that a single warning is emitted that enumerates all offending fields.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

colings86 added a commit that referenced this issue Sep 11, 2018
* Improves doc values format deprecation message

This changes the deprecation message when doc values fields do not
supply a format form logging a deprecation warning for each offending
field individually to logging a single message which lists all
offending fields

Closes #33572

* Updates YAML test with new deprecation message

Also adds a test to ensure multiple deprecation warnings are collated
into one message

* Condenses collection of fields without format check

Moves the collection of fields that don't have a format to a separate
loop and moves the logging of the deprecation warning to be next to it
at the expesnse of looping through the field list twice

* fixes typo

* Fixes test
colings86 added a commit that referenced this issue Sep 11, 2018
* Improves doc values format deprecation message

This changes the deprecation message when doc values fields do not
supply a format form logging a deprecation warning for each offending
field individually to logging a single message which lists all
offending fields

Closes #33572

* Updates YAML test with new deprecation message

Also adds a test to ensure multiple deprecation warnings are collated
into one message

* Condenses collection of fields without format check

Moves the collection of fields that don't have a format to a separate
loop and moves the logging of the deprecation warning to be next to it
at the expesnse of looping through the field list twice

* fixes typo

* Fixes test
colings86 added a commit that referenced this issue Sep 11, 2018
* Improves doc values format deprecation message

This changes the deprecation message when doc values fields do not
supply a format form logging a deprecation warning for each offending
field individually to logging a single message which lists all
offending fields

Closes #33572

* Updates YAML test with new deprecation message

Also adds a test to ensure multiple deprecation warnings are collated
into one message

* Condenses collection of fields without format check

Moves the collection of fields that don't have a format to a separate
loop and moves the logging of the deprecation warning to be next to it
at the expesnse of looping through the field list twice

* fixes typo

* Fixes test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants