log when failing to process doc after index operation
This commit is contained in:
parent
79ebcc31c5
commit
f8ff42d397
|
@ -222,10 +222,9 @@ public class TransportShardBulkAction extends TransportShardReplicationOperation
|
|||
try {
|
||||
PercolatorExecutor.Response percolate = indexService.percolateService().percolate(new PercolatorExecutor.DocAndSourceQueryRequest(op.parsedDoc(), indexRequest.percolate()));
|
||||
((IndexResponse) itemResponse.response()).matches(percolate.matches());
|
||||
op.docMapper().processDocumentAfterIndex(op.doc());
|
||||
} catch (Exception e) {
|
||||
logger.warn("failed to percolate [{}]", e, itemRequest.request());
|
||||
} finally {
|
||||
op.docMapper().processDocumentAfterIndex(op.doc());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -212,17 +212,20 @@ public class TransportIndexAction extends TransportShardReplicationOperationActi
|
|||
@Override protected void postPrimaryOperation(IndexRequest request, PrimaryResponse<IndexResponse> response) {
|
||||
Engine.IndexingOperation op = (Engine.IndexingOperation) response.payload();
|
||||
if (!Strings.hasLength(request.percolate())) {
|
||||
op.docMapper().processDocumentAfterIndex(op.doc());
|
||||
try {
|
||||
op.docMapper().processDocumentAfterIndex(op.doc());
|
||||
} catch (Exception e) {
|
||||
logger.warn("failed to cleanup doc after index [{}]", e, request);
|
||||
}
|
||||
return;
|
||||
}
|
||||
IndexService indexService = indicesService.indexServiceSafe(request.index());
|
||||
try {
|
||||
PercolatorExecutor.Response percolate = indexService.percolateService().percolate(new PercolatorExecutor.DocAndSourceQueryRequest(op.parsedDoc(), request.percolate()));
|
||||
response.response().matches(percolate.matches());
|
||||
op.docMapper().processDocumentAfterIndex(op.doc());
|
||||
} catch (Exception e) {
|
||||
logger.warn("failed to percolate [{}]", e, request);
|
||||
} finally {
|
||||
op.docMapper().processDocumentAfterIndex(op.doc());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue