Skip to content

Commit

Permalink
Merge pull request #11583 from bleskes/mapper_exception_unwrap
Browse files Browse the repository at this point in the history
Recovery: Fix MapperException detection during translog ops replay
  • Loading branch information
bleskes committed Jun 10, 2015
2 parents 831cfa5 + e9d275d commit 650950c
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -306,7 +306,8 @@ public void messageReceived(final RecoveryTranslogOperationsRequest request, fin
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
Expand Down

0 comments on commit 650950c

Please sign in to comment.