Skip to content

Opening indices with broken index settings #26998

Open
@jasontedor

Description

@jasontedor

Today we are lenient with index settings, we do the following things:

  1. We will open an index even if it contains an index setting that we do not recognize because we do not do any index settings validation when opening an index.
  2. We will upgrade an index and archive unrecognized settings; this is bad in the following scenario:
    a. a user installs a plugin that provides an index setting
    b. a user creates an index that uses that index setting
    c. a user stops Elasticsearch to upgrade, so removes the plugin
    d. the user upgrades Elasticsearch, and starts Elasticsearch not having reinstalled the plugin
    e. Elasticsearch will archive the index setting and happily open the index

This leniency is dangerous and we should stop.

To be fair, the reason for the existence of this leniency in the upgrade case is for when we first introduced strict settings, we knew that we would see unrecognized settings on indices coming from 2.x into 5.x. We are past that point now. It's time to reconsider this leniency.

Relates #26995

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions