You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Mark Payne (Jira)" <ji...@apache.org> on 2020/11/13 16:27:00 UTC

[jira] [Resolved] (NIFI-6820) If Processor adjusts a counter but does not interact with any FlowFiles, the counter isn't updated

     [ https://issues.apache.org/jira/browse/NIFI-6820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Payne resolved NIFI-6820.
------------------------------
    Resolution: Fixed

> 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
>          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)