Changing index settings when closed can corrupt an index

I found a warning in this documentation page about updating index settings while they are closed:

Changing static or dynamic index settings on a closed index could result in incorrect settings that are impossible to rectify without deleting and recreating the index.

Source: Index modules | Elasticsearch Guide [7.17] | Elastic

Does this refer to any setting? If so, why is updating the settings allowed on a closed index?

What I want to achieve is to update the index.codec setting, which can't be done while the index is open or I would get:

Can't update non dynamic settings [[index.codec]] for open indices ...

So I was considering closing the index before doing the update, but then it seems there is no guarantee my index can be reopened later?

ES version: 7.17, but the warning is also in the 8.x docs.

You will be safe changing that setting, as you point out, it needs to be closed to changed it.

@warkolm Do you know of a list of settings we can safely change while the index is closed which confirms index.codec is safe to change?
I would like to have confirmation in the docs as otherwise this could change in a future version of ES and the release notes wouldn't point that out as a breaking change.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.