Deprecation logging

What does deprecation logging mean? It means that when “logger.deprecation.level = warn” is set, each time a deprecated class/method/interface is invoked, the corresponding logging message would be printed out. Am I correct?

I think that is correct, in my case I have clients / scripts / queries which follows the upgrade paths but not all of them are adjusted to the latest syntax and produces warning like this:

[2018-05-07T06:11:28,873][WARN ][o.e.d.s.a.MultiBucketConsumerService] This aggregation creates too many buckets (10001) and will throw an error in future version
s. You should update the [search.max_buckets] cluster setting or use the [composite] aggregation to paginate all buckets in multiple requests.
[2018-05-07T06:20:02,085][WARN ][o.e.d.s.a.InternalOrder$Parser] Deprecated aggregation order key [_term] used, replaced by [_key]

It's not quite this. The deprecation logger is there to help you move between major versions of Elasticsearch, and logs a message each time you use a feature of Elasticsearch that will change in the next major release. You should try and fix any such messages as they arise, and must do so before upgrading your Elasticsearch cluster.

Sometimes this might correspond with using a deprecated class or method or interface, but mostly it's not that at all. @pjanzen's message gives a good example:

This aggregation creates too many buckets (10001) and will throw an error in future versions. You should update the [search.max_buckets] cluster setting or use the [composite] aggregation to paginate all buckets in multiple requests.

In this case Elasticsearch will introduce a limit on the number of buckets in an aggregation, which is a breaking change so for now you just get a warning that this application won't work in the next major version, but if you upgrade Elasticsearch then you'll hit an error unless you fix this first.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.