Skip to content

Allow to seal an index #10032

@s1monw

Description

@s1monw

In a lot of use cases indices are used for indexing only for a limited amount of time. Ie. in the daily index use case indices are created with a highish number of shards to scale out indexing and then after a couple of days these indices are idle in terms of writing. Yet, we still keep all the resources open since we are accepting writes at any time. This not necessary in a lot of cases and would allow for a large amount of optimizations:

  • we can close IndexWriter and all it's resources.
  • primary promotions are very simple since no changes are coming in
  • indices might be able to be merged ie. if you have 7 indices for per week we can allow people to
    merge them into a weekly index to reduce the number of indices.
  • query caches can rely on the fact that the index doesn't change and we can pull out min/max values for numeric fields with more confidence that it's worth the effort.
  • maybe most important, recoveries are instant. We would issue a special commit when we seal that ensures that all changes have been written containing some kind of identifier that we can use in recovery which will prevent the entire copying of files in situations of full cluster restarts etc. It will reduce the restart times dramatically with very low complexity for all the time-based indices cases which usually suffer from slow cluster restarts due to the large number of indices and shards

Metadata

Metadata

Assignees

Labels

:Distributed Indexing/RecoveryAnything around constructing a new shard, either from a local or a remote source.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions