Peter Turcsanyi created NIFI-15431:
--------------------------------------
Summary: PutSmbFile can fail with "StandardContentClaim is already
marked for transfer"
Key: NIFI-15431
URL: https://issues.apache.org/jira/browse/NIFI-15431
Project: Apache NiFi
Issue Type: Bug
Reporter: Peter Turcsanyi
Assignee: Peter Turcsanyi
PutSmbFile processes the FlowFiles in batches (one onTrigger fetches N
FlowFiles and uploads them in a loop). The error handling of individual
FlowFiles is essentially separate: the successfully uploaded files go to the
Success relationship while failed ones go to Failure. However, in some error
cases - such as directory creation failure or generic error - only the outer
level error handler catches the exception. This handler is intended for
connection or authentication errors and attempts to transfer all FlowFiles to
Failure. This may result in a "StandardContentClaim is already marked for
transfer" error, because some FlowFiles in the batch have already been
processed successfully and routed to Success. Consequently, the entire batch is
rolled back.
Stack trace:
{code:java}
2026-01-06 17:20:32,216 ERROR [Timer-Driven Process Thread-10]
o.apache.nifi.processors.smb.PutSmbFile
PutSmbFile[id=136e1017-a2b5-3680-b7f5-c08813f8e62e] Processing halted: yielding
[1 sec]
org.apache.nifi.processor.exception.FlowFileHandlingException:
StandardFlowFileRecord[uuid=698f2cfd-e84e-4cc2-8647-d502926cf92a,claim=StandardContentClaim
[resourceClaim=StandardResourceClaim[id=1767716178875-1, container=default,
section=1], offset=24,
length=4],offset=0,name=698f2cfd-e84e-4cc2-8647-d502926cf92a,size=4] is already
marked for transfer
at
org.apache.nifi.controller.repository.StandardProcessSession.validateRecordState(StandardProcessSession.java:3703)
at
org.apache.nifi.controller.repository.StandardProcessSession.validateRecordState(StandardProcessSession.java:3685)
at
org.apache.nifi.controller.repository.StandardProcessSession.validateRecordState(StandardProcessSession.java:3716)
at
org.apache.nifi.controller.repository.StandardProcessSession.transfer(StandardProcessSession.java:2396)
at
org.apache.nifi.processors.smb.PutSmbFile.onTrigger(PutSmbFile.java:418)
at
org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at
org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1274)
at
org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:229)
at
org.apache.nifi.controller.scheduling.AbstractTimeBasedSchedulingAgent.lambda$doScheduleOnce$0(AbstractTimeBasedSchedulingAgent.java:59)
at org.apache.nifi.engine.FlowEngine.lambda$wrap$1(FlowEngine.java:105)
at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at
java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)