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 2020/11/13 16:26:00 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17231605#comment-17231605 ] 

ASF subversion and git services commented on NIFI-6820:
-------------------------------------------------------

Commit c57d0abcd3773d260621cb274e2aa429e034f996 in nifi's branch refs/heads/main from s9514171
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=c57d0ab ]

NIFI-6820 If Processor adjusts a counter but does not interact with any FlowFiles, the counter isn't updated


> 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: 50m
>  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)