Merge pull request #11583 from bleskes/mapper_exception_unwrap

Recovery: Fix MapperException detection during translog ops replay
This commit is contained in:
Boaz Leskes 2015-06-10 19:06:53 +02:00
commit 650950c7f4
1 changed files with 2 additions and 1 deletions

View File

@ -306,7 +306,8 @@ public class RecoveryTarget extends AbstractComponent {
try {
recoveryStatus.indexShard().performBatchRecovery(request.operations());
} catch (TranslogRecoveryPerformer.BatchOperationException exception) {
if (ExceptionsHelper.unwrapCause(exception) instanceof MapperException == false) {
MapperException mapperException = (MapperException) ExceptionsHelper.unwrap(exception, MapperException.class);
if (mapperException == null) {
throw exception;
}
// in very rare cases a translog replay from primary is processed before a mapping update on this node