mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-02 08:59:09 +00:00
add debug logging on failed bug items executions
This commit is contained in:
parent
f25eebb249
commit
f5a8c3881f
@ -124,6 +124,9 @@ public class TransportShardBulkAction extends TransportShardReplicationOperation
|
|||||||
ops[i] = indexShard.prepareCreate(sourceToParse);
|
ops[i] = indexShard.prepareCreate(sourceToParse);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("[" + shardRequest.request.index() + "][" + shardRequest.shardId + "]" + ": Failed to execute bulk item (index) [" + indexRequest + "]", e);
|
||||||
|
}
|
||||||
responses[i] = new BulkItemResponse(item.id(), indexRequest.opType().toString().toLowerCase(),
|
responses[i] = new BulkItemResponse(item.id(), indexRequest.opType().toString().toLowerCase(),
|
||||||
new BulkItemResponse.Failure(indexRequest.index(), indexRequest.type(), indexRequest.id(), ExceptionsHelper.detailedMessage(e)));
|
new BulkItemResponse.Failure(indexRequest.index(), indexRequest.type(), indexRequest.id(), ExceptionsHelper.detailedMessage(e)));
|
||||||
}
|
}
|
||||||
@ -132,6 +135,9 @@ public class TransportShardBulkAction extends TransportShardReplicationOperation
|
|||||||
try {
|
try {
|
||||||
ops[i] = indexShard.prepareDelete(deleteRequest.type(), deleteRequest.id());
|
ops[i] = indexShard.prepareDelete(deleteRequest.type(), deleteRequest.id());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("[" + shardRequest.request.index() + "][" + shardRequest.shardId + "]" + ": Failed to execute bulk item (delete) [" + deleteRequest + "]", e);
|
||||||
|
}
|
||||||
responses[i] = new BulkItemResponse(item.id(), "delete",
|
responses[i] = new BulkItemResponse(item.id(), "delete",
|
||||||
new BulkItemResponse.Failure(deleteRequest.index(), deleteRequest.type(), deleteRequest.id(), ExceptionsHelper.detailedMessage(e)));
|
new BulkItemResponse.Failure(deleteRequest.index(), deleteRequest.type(), deleteRequest.id(), ExceptionsHelper.detailedMessage(e)));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user