[
https://issues.apache.org/jira/browse/NIFI-4410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16226753#comment-16226753
]
ASF GitHub Bot commented on NIFI-4410:
--------------------------------------
Github user MikeThomsen commented on the issue:
https://github.com/apache/nifi/pull/2175
I found one area that this doesn't handle properly at all, and that's
deleting documents where the ID cannot be found. The reason your patch fails
there is that the check around the declaration of `boolean errors` ~ line 353
doesn't expect ElasticSearch to treat this as an inconsequential problem
instead of an error. See this JSON I got in the debugger when running a flow:
{
"took": 346,
"errors": false,
"items": [{
"delete": {
"found": false,
"_index": "events",
"_type": "event",
"_id": "abcd_1509454409510",
"_version": 1,
"result": "not_found",
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"status": 404
}
}]
}
I try indexing some really bad (syntatically valid JSON that is not what
Elastic expects) and see if that goes to the error queue.
My guess is that an update on a missing document ID will return the same
sort of JSON as the delete.
> PutElasticsearchHttp needs better error handling and logging
> ------------------------------------------------------------
>
> Key: NIFI-4410
> URL: https://issues.apache.org/jira/browse/NIFI-4410
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Joseph Witt
> Assignee: Matt Burgess
>
> https://github.com/apache/nifi/blob/6b5015e39b4233cf230151fb45bebcb21df03730/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchHttp.java#L364-L366
> If it cannot extract the reason text it provides a very generic error and
> there is nothing else logged. You get no context as to what went wrong and
> further the condition doesn't cause yielding or anything so there is just a
> massive flood of errors in logs that dont' advise the user of the problem.
> We need to make sure the information can be made available to help
> troubleshoot and we need to cause yielding so that such cases do not cause
> continuous floods of errors.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)