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 2019/10/29 14:39:00 UTC

[jira] [Commented] (NIFI-6800) StandardProcessSession error - hashmap counter overwritten in highThroughputSession

    [ https://issues.apache.org/jira/browse/NIFI-6800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16962066#comment-16962066 ] 

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

Commit 67f1677212368290228b373fdbeb73f0265e2211 in nifi's branch refs/heads/master from Ivan Ezequiel Rodriguez
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=67f1677 ]

NIFI-6800 - Fix hashmap counter overwritten in highThroughputSession

This closes #3837.

Signed-off-by: Mark Payne <ma...@hotmail.com>


> StandardProcessSession error - hashmap counter overwritten in highThroughputSession
> -----------------------------------------------------------------------------------
>
>                 Key: NIFI-6800
>                 URL: https://issues.apache.org/jira/browse/NIFI-6800
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.9.2
>            Reporter: Iván Ezequiel Rodriguez
>            Assignee: Iván Ezequiel Rodriguez
>            Priority: Major
>              Labels: bug, core, counters, fix, framework, high, nifi, session
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> The error is present until version 1.9.2 and earlier in the class StandardProcessSession.java
> The error is on line 3383 in the following code block:
> if (session.countersOnCommit != null)
> { this.countersOnCommit.putAll(session.countersOnCommit); }
> The putALL method is called and the values ​​are not being mixed when it comes to existing keys
>  As we know hashmap does not allow duplicate keys. So when we merge the maps in this way, for duplicate keys in map1 the value is overwitten by value for same key in map2.
>  This replacement causes the counters to be overwritten when highThroughputSession is activated.This situation only happens if the flag "immediately" is false in the call at method adjustCounter, since in this way the counters are adjusted in the commit and stored in each checkpoint.
>  I leave a video showing the error and the request for changes in git with the solution in the code that I propose:
> [Nifi Bug StandardProcessSession error - hashmap counter overwritten in highThroughputSession|https://youtu.be/DzwEQWmxNKc]
> This video shows a comparison between version 1.9.2 and the version that I compiled with the fix myself:
> [NIFI-6800 - FIX -hashmap counter overwritten in highThroughputSession|https://youtu.be/zlAQ69WX0tw]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)