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/07/02 14:17:00 UTC

[jira] [Commented] (NIFI-6410) FlowFile Repository could become corrupt if IOException or OOME thrown

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

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

Commit 40dcd1577b5738f06f480196d74c76c779ac057b in nifi's branch refs/heads/master from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=40dcd15 ]

NIFI-6410: Addressed race condition in LengthDelimitedJournal in which a Thread could throw an Exception, then another Thread could update the Journal before the first thread closes it. Added unit test to replicate.

This closes #3561


> FlowFile Repository could become corrupt if IOException or OOME thrown
> ----------------------------------------------------------------------
>
>                 Key: NIFI-6410
>                 URL: https://issues.apache.org/jira/browse/NIFI-6410
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>            Priority: Major
>             Fix For: 1.10.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The LengthDelimitedJournal class allows only a single thread to write to the journal at a time (protected by a synchronized block). If the Thread throws an Exception while writing, it calls the poison() method in order to prevent any other Thread from updating the Repo and causing corruption. However, there is a race condition that exists, where the Thread will exit the synchronized block and then call poison(), which could result in a second Thread entering the synchronized block and updating the Repository, which can corrupt the Repository.
> This would only happen in conditions such as an OutOfMemoryError or if the FlowFile Repository runs out of disk space, and even then it won't necessarily occur. But it can, so it needs to be addressed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)