You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Andrey (Jira)" <ji...@apache.org> on 2020/02/25 08:30:00 UTC
[jira] [Created] (NIFI-7195) PutMongoRecord processor incorrectly
routes failure flow files
Andrey created NIFI-7195:
----------------------------
Summary: 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
Hello!
When I use batch processor for insert data to Mongo, if I get some error like "write errors: [BulkWriteError{index=0, code=11000, message='E11000 duplicate key error collection" flow file does not route to the failure relationship, but tries to repeat attempting of data process.
I think it depends from this part of source code:
??} catch (SchemaNotFoundException | IOException | MalformedRecordException e) {??
?? getLogger().error("PutMongoRecord failed with error:", e);??
?? session.transfer(flowFile, REL_FAILURE);??
?? error = true;??
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)