You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Koji Kawamura (JIRA)" <ji...@apache.org> on 2017/05/15 23:46:04 UTC
[jira] [Commented] (NIFI-3898) PutSql - flow files get stuck in
incoming queue if there are incorrect INSERT statements in flow files
[ https://issues.apache.org/jira/browse/NIFI-3898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16011513#comment-16011513 ]
Koji Kawamura commented on NIFI-3898:
-------------------------------------
[~egortsaryk9] Thanks for reporting this issue. I agree with the idea of routing incorrect/broken SQL statements to 'failure' relationship. Actually it does that with SQLExceptions. When I tried to reproduce this issue, I got a FlowFile containing incorrect SQL routed to 'failure'.
The difference between your situation is that, you got java.lang.ArrayIndexOutOfBoundsException, while I got java.sql.BatchUpdateException. Since ArrayIndexOutOfBoundsException is not a 'known Exception' possibly to happen, PutSQL threw a ProcessException and the FlowFile stayed in incoming queue, instead of routing it to 'failure'.
I'd like to know whey ArrayIndexOutOfBoundsException was thrown, and if it was thrown from NiFi source code, it should be fixed.
Could you share java stack-trace written in nifi-app.log? That will be very helpful to fix this issue. Thank you.
> PutSql - flow files get stuck in incoming queue if there are incorrect INSERT statements in flow files
> ------------------------------------------------------------------------------------------------------
>
> Key: NIFI-3898
> URL: https://issues.apache.org/jira/browse/NIFI-3898
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 1.2.0
> Reporter: yahor tsaryk
> Assignee: Koji Kawamura
> Priority: Critical
> Labels: putsql
> Attachments: Screen Shot 2017-05-15 at 21.25.46.png, Screen Shot 2017-05-15 at 21.25.54.png
>
>
> Hi everybody, I just updated to 1.2.0 version and I found that if incoming flow file for PutSql processor contains incorrect sql INSERT statement (such as
> INSERT INTO public.my_table(id, data) VALUES('220f27c5-ce2f-4ab4-8bdd-fc9187d36783', ' '{"my_jsonb_data_field":"some data"}') ON CONFLICT DO NOTHING; - the statement contains redundant apostrophe character) the flow files just get stuck in the incoming queue, they haven't being directed to "Failure" queue.
> I don't use "Rollback On Failure" feature - it is set to false. "Support Fragmented Transactions" option is also set to false.
> Also I tried to set "Batch Size" value to 1 but result is the same as with default batch size value (100). (It fails with "java.lang.ArayIndexOutOfBoundsException")
> Shouldn't incoming flow files with incorrect/broken sql statements be directed to the "Failure" relationship automatically ? Current behavior reminds like "Rollback On Failure" feature is set to true, but I just want to filter out incorrect sql insert statements.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)