Why cannot restore index from snapshot if an open index with same name exists in the cluster?
In Elasticsearch Source Code server/src/main/java/org/elasticsearch/snapshots/RestoreService.java method validateExistingIndex, there is a TODO that // TODO: Enable restore for open indices.
If I want to create snapshot incrementally from a cluster, and only restore index in another cluster, can I change the index exist checking?
Restoring into an open index would be really complicated to implement, because the restore needs to replace the underlying files. Doing that while closed is simpler since those files aren't in use, but if the index were open then we can't simply replace them. Also we'd need to do the restore on all the replicas at the same time, rather than today's process which only happens on the primary.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.