Open jgournet opened 1 month ago
is the issue still open, right?
Hi @jgournet @mahadzaryab1
Reconfirming the Problem: When template AND index_template are mixed together, they do not behave well. One will take over and the other just does not work at all.
Reproduce the issue: Current Situation:
curl http://localhost:9200/_template/jaeger-service?pretty
{
"settings": { "index": { "number_of_shards": "3" } }
}
Index template (_index_template) configuring 5 shards:
curl http://localhost:9200/_index_template/jaeger-service?pretty
{
"template": { "settings": { "index": { "number_of_shards": "5" } } }
}
When checking actual indices:
curl http://localhost:9200/jaeger-service-*/_settings?pretty
{
"number_of_shards": "5" // index_template wins
}
This confirms that when both templates exist:
According to Elasticsearch's documentation and behavior:
i.e
The index_template takes precedence The legacy template is ignored Could cause confusion for users managing their Elasticsearch setup
Proposed Solution:
Deprecate support for legacy templates? Add migration documentation?
Anything you want to share s this intended behavior to have support for both the shards? (Also how shall i tag the maintainers in this repo?)
To me, ideally, I'd say that when jaeger starts up, it should check the ES version before creating those templates; and create the "right" ones depending on the version. Otherwise, jaeger could attempt to create _index_template first; and:
Requirement
As a jaeger admin, we're using Opensearch as the storage. We have also migrated all our old "template" to "index_template" ( https://www.elastic.co/guide/en/elasticsearch/reference/current/index-templates.html ).
Problem
Problem is that when template AND index_template are mixed together, they do not behave well. One will take over and the other just does not work at all
Proposal
Move to index_template
Open questions
See discussion there on the bug, the error message and the resolution: https://discuss.elastic.co/t/connecting-from-jaeger-tracing-to-elasticsearch/365713