index name added to snapshot restore exception (#29604)
This PR adds index name to snapshot restore exception if index is renamed during restoring. closes [#27601](https://github.com/elastic/elasticsearch/issues/27601)
This commit is contained in:
parent
5de6f4ff7b
commit
dd5fcb211d
|
@ -412,7 +412,7 @@ public class RestoreService extends AbstractComponent implements ClusterStateApp
|
|||
// Make sure that the number of shards is the same. That's the only thing that we cannot change
|
||||
if (currentIndexMetaData.getNumberOfShards() != snapshotIndexMetaData.getNumberOfShards()) {
|
||||
throw new SnapshotRestoreException(snapshot, "cannot restore index [" + renamedIndex + "] with [" + currentIndexMetaData.getNumberOfShards() +
|
||||
"] shard from snapshot with [" + snapshotIndexMetaData.getNumberOfShards() + "] shards");
|
||||
"] shards from a snapshot of index [" + snapshotIndexMetaData.getIndex().getName() + "] with [" + snapshotIndexMetaData.getNumberOfShards() + "] shards");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue