Elasticsearch: Introduce the notion of system composable index templates

Created on 7 Dec 2020  路  5Comments  路  Source: elastic/elasticsearch

Currently many index template and composable index template exist for Elastic (internal) features, these
templates are installed by the elected master node when the cluster has booted. If these templates are
removed then these templates are added back and there is logic that optionally updates these templates if after
an Elasticsearch upgrade.

Besides what is described above, there isn't anything special about these template. While these templates should
be treated in a special way. For example these templates shouldn't be returned by default in the get template api. Nor should it be possible to even attempt to delete or modify those templates.

I think it would be great if system composable index templates and system component templates could be defined in the same way as system indices (Either via SystemIndexPlugin interface or another plugin interface). This should replace IndexTemplateRegistry and subclasses.

:CorFeatureIndices APIs >enhancement CorFeatures

Most helpful comment

There are obvious parallels between what I'm doing for system indices and the index template registry. However as the moment, I don't believe any system indices strictly require a template, because we can embed the settings and mappings in the system index descriptor. There's no support right now if a system index definitely requires a template - for example, if we ever wanted a system data stream. I had thought that a system data stream was unlikely.

At the moment, I think any implementation for this issue would be similar to #65604, but wouldn't actually overlap _per se_.

All 5 comments

Pinging @elastic/es-core-features (Team:Core/Features)

It sounds like this overlaps substantially with https://github.com/elastic/elasticsearch/pull/65604, we should make sure we're coordinating efforts.

/cc @pugnascotia, @jaymode

Thanks @gwbrown for referencing that pr. I wasn't sure whether this falls under system indices, but the goal for opening this issue was for improving how we today manage templates of internal data streams / time based index patterns, which currently aren't a system indices, but are just hidden, which seems to fall outside the scope of the current system index development effort.

There are obvious parallels between what I'm doing for system indices and the index template registry. However as the moment, I don't believe any system indices strictly require a template, because we can embed the settings and mappings in the system index descriptor. There's no support right now if a system index definitely requires a template - for example, if we ever wanted a system data stream. I had thought that a system data stream was unlikely.

At the moment, I think any implementation for this issue would be similar to #65604, but wouldn't actually overlap _per se_.

@pugnascotia I agree with your assessment that system indices have no dependency on this issue which purpose is to replace template registry infrastructure with system index templates.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

abtpst picture abtpst  路  3Comments

makeyang picture makeyang  路  3Comments

rjernst picture rjernst  路  3Comments

malpani picture malpani  路  3Comments

clintongormley picture clintongormley  路  3Comments