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:
Diwas Joshi 2018-05-01 18:46:38 +05:30 committed by Boaz Leskes
parent 5de6f4ff7b
commit dd5fcb211d
1 changed files with 1 additions and 1 deletions

View File

@ -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");
}
}