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 2025/12/04 09:57:00 UTC
[jira] [Commented] (NIFI-15169) ExecuteSQLRecord fails silently on sql exception when outputBatchSize is set
[ https://issues.apache.org/jira/browse/NIFI-15169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18042735#comment-18042735 ]
ASF subversion and git services commented on NIFI-15169:
--------------------------------------------------------
Commit 821ad8fe860873048a4b6d385839c17eeb87825f in nifi's branch refs/heads/main from Rajmund Takacs
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=821ad8fe86 ]
NIFI-15169 Ensure ExecuteSQLRecord routes streaming failures
Signed-off-by: Mark Bathori <mb...@apache.org>
This closes #10584.
> ExecuteSQLRecord fails silently on sql exception when outputBatchSize is set
> ----------------------------------------------------------------------------
>
> Key: NIFI-15169
> URL: https://issues.apache.org/jira/browse/NIFI-15169
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.25.0
> Reporter: Daniele Pirola
> Assignee: Rajmund Takacs
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Configure ExecuteSQLRecord component:
> * set outputBatchSize > 0
> * set fetchSize > 0
> After first loop (fetch and route the result) if the database throw an error (session killed, snapshot too old, ...) the error is only logged and no flow files are routed to failure.
> I think that the error has been generated by NIFI-6040 that when outputBatchSize is set erase fileToProcess variable.
> When there is an Exception on the catch statement the code:
> {code:java}
> //If we had at least one result then it's OK to drop the original file, but if we had no results then
> // pass the original flow file down the line to trigger downstream processors
> if (fileToProcess == null) {
> // This can happen if any exceptions occur while setting up the connection, statement, etc.
> logger.error("Unable to execute SQL select query {} due to {}. No FlowFile to route to failure",
> new Object[]{selectQuery, e});
> context.yield();
> } else {{code}
> log only the error silently
--
This message was sent by Atlassian Jira
(v8.20.10#820010)