[
https://issues.apache.org/jira/browse/NIFI-6820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matt Burgess updated NIFI-6820:
-------------------------------
Fix Version/s: 1.13.0
> If Processor adjusts a counter but does not interact with any FlowFiles, the
> counter isn't updated
> --------------------------------------------------------------------------------------------------
>
> Key: NIFI-6820
> URL: https://issues.apache.org/jira/browse/NIFI-6820
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Reporter: Mark Payne
> Assignee: Hsin-Ying Lee
> Priority: Major
> Labels: beginner, easyfix, newbie
> Fix For: 1.13.0
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> If a Processor calls `ProcessSession.adjustCounter` and passes `false` for
> the `immediate` argument, the adjustment for the counter should be maintained
> by the ProcessSession. Then, when (if) the session is committed, the counter
> should actually be updated. However, if the Processor never interacts with
> any FlowFiles (never calls `get()` or `create()`), then the counter never
> gets updated.
> This appears to be due to the fact that in the `checkpoint` method,
> `StandardProcessSession` checks if `records.isEmpty()` and if so returns. In
> such a case, it needs to first ensure that it transfers the counters to the
> checkpoint before returning.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)