OpenSearch/x-pack/plugin/watcher
Jake Landis 813609b47c
Ensure that .watcher-history-11* template is in installed prior to use (#56734)
WatcherIndexTemplateRegistry as of https://github.com/elastic/elasticsearch/pull/52962 
requires all nodes to be on 7.7.0 before it allows the version 11 index template to be 
installed.

While in a mixed cluster, nothing prevents Watcher from running on the new
host before the all of the nodes are on 7.7.0. This will result in the
.watcher-history-11* index without the proper mappings. Without the proper
mapping a single document (for a large watch) can exceed the default 1000 field
limit and cause error to show in the logs.

This commit ensures the same logic for writing to the index is applied as for
installing the template. In a mixed cluster, the `10` index template will continue
to be written. Only once all of nodes are on 7.7.0+ will the `11` index template
be installed and used.

closes #56732
2020-05-15 16:29:04 -05:00
..
licenses Enforce strict license distribution requirements (#56642) 2020-05-14 13:57:56 -07:00
qa Deprecate disabling basic-license features (#54816) (#55405) 2020-04-17 15:04:17 -04:00
src Ensure that .watcher-history-11* template is in installed prior to use (#56734) 2020-05-15 16:29:04 -05:00
build.gradle Remove guava from transitive compile classpath (#54309) (#54695) 2020-04-07 23:20:17 -07:00