Merge pull request #11583 from bleskes/mapper_exception_unwrap
Recovery: Fix MapperException detection during translog ops replay
This commit is contained in:
commit
650950c7f4
|
@ -306,7 +306,8 @@ public class RecoveryTarget extends AbstractComponent {
|
||||||
try {
|
try {
|
||||||
recoveryStatus.indexShard().performBatchRecovery(request.operations());
|
recoveryStatus.indexShard().performBatchRecovery(request.operations());
|
||||||
} catch (TranslogRecoveryPerformer.BatchOperationException exception) {
|
} catch (TranslogRecoveryPerformer.BatchOperationException exception) {
|
||||||
if (ExceptionsHelper.unwrapCause(exception) instanceof MapperException == false) {
|
MapperException mapperException = (MapperException) ExceptionsHelper.unwrap(exception, MapperException.class);
|
||||||
|
if (mapperException == null) {
|
||||||
throw exception;
|
throw exception;
|
||||||
}
|
}
|
||||||
// in very rare cases a translog replay from primary is processed before a mapping update on this node
|
// in very rare cases a translog replay from primary is processed before a mapping update on this node
|
||||||
|
|
Loading…
Reference in New Issue