You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/03/21 18:02:00 UTC
[jira] [Commented] (NIFI-9800) Unwrap SQLExceptions in PutDatabaseRecord when table does not exist
[ https://issues.apache.org/jira/browse/NIFI-9800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17510054#comment-17510054 ]
ASF subversion and git services commented on NIFI-9800:
-------------------------------------------------------
Commit c84f43878205726a4e7b891ebd64068516bcfe68 in nifi's branch refs/heads/main from Matt Burgess
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=c84f438 ]
NIFI-9800: Unwrap SQLException in PutDatabaseRecord when table does not exist
Signed-off-by: Matthew Burgess <ma...@apache.org>
This closes #5871
> Unwrap SQLExceptions in PutDatabaseRecord when table does not exist
> -------------------------------------------------------------------
>
> Key: NIFI-9800
> URL: https://issues.apache.org/jira/browse/NIFI-9800
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Reporter: Matt Burgess
> Assignee: Matt Burgess
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> As of NIFI-5757, SQLExceptions in PutDatabaseRecord's code to determine table information have been wrapped in a ProcessException as the code was moved into a lambda. Until NIFI-8146, this introduced a regression as the flowfile would be rolled back (even if Rollback on Failure is false) rather than being routed to failure.
> The refactor of PutDatabaseRecord in NIFI-8146 changed the logic to correctly route to failure; however the exception is still wrapped in a ProcessException and should be unwrapped before logging. Behavior (transfer to failure) should remain the same and thus avoid another regression.
> To test, simply send a flowfile to PutDatabaseRecord to a table that doesn't exist. In NiFi 1.8, it will be routed to failure. In NiFi 1.9-1.12, it will be rolled back. In 1.13+ it is again routed to failure. After this Jira, it should still be routed to failure but logged as a SQLException rather than a ProcessException with a SQLException cause.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)