You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Rajmund Takacs (Jira)" <ji...@apache.org> on 2025/12/01 14:45:00 UTC
[jira] [Assigned] (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:all-tabpanel ]
Rajmund Takacs reassigned NIFI-15169:
-------------------------------------
Assignee: Rajmund Takacs
> 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: 10m
> 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)