Restore snapshot with include_global_state=true is not reverting some custom metadata #81247
Labels
>bug
:Distributed Coordination/Snapshot/Restore
Anything directly related to the `_snapshot/*` APIs
Team:Distributed (Obsolete)
Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.
Elasticsearch version (
bin/elasticsearch --version
): 7.16Description of the problem including expected versus actual behavior:
According to the code:
elasticsearch/server/src/main/java/org/elasticsearch/snapshots/RestoreService.java
Line 1203 in 0f10825
and
elasticsearch/server/src/main/java/org/elasticsearch/snapshots/RestoreService.java
Lines 1410 to 1422 in 0f10825
when restoring global state from a snapshot we keep existing metadata as a baseline. This means some custom metadata items are going to be preserved as is if they are not present in a global state from the snapshot (if it was taken before the those were configured or even existed).
Steps to reproduce:
restore from the snapshot (with include_global_state=true)
Expected result:
Actual result:
The text was updated successfully, but these errors were encountered: