[ 
https://issues.apache.org/jira/browse/NIFI-7195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17045676#comment-17045676
 ] 

Rupert Bignall commented on NIFI-7195:
--------------------------------------

Thanks Pierre! I have added https://issues.apache.org/jira/browse/NIFI-7204 for 
the retry relationship but I will add a separate one for the other behaviour 
(it needs more thought).

> PutMongoRecord processor incorrectly routes failure flow files
> --------------------------------------------------------------
>
>                 Key: NIFI-7195
>                 URL: https://issues.apache.org/jira/browse/NIFI-7195
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.9.2
>            Reporter: Andrey
>            Assignee: Pierre Villard
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Hello!
> When I use batch processor for inserting data to Mongo, if I get some error 
> like "write errors: [BulkWriteError
> {index=0, code=11000, message='E11000 duplicate key error collection" flow 
> file is not routed to the failure relationship, but processor tries to repeat 
> data process. I think it depends on this part of source code:
> *catch (SchemaNotFoundException | IOException | MalformedRecordException e)* 
> Apparently the exception is not caught:
> [https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/PutMongoRecord.java#L147]
>  I think it is not normal processor behavior.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to