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

ASF GitHub Bot commented on NIFI-2551:
--------------------------------------

Github user mosermw commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/848#discussion_r74800253
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
 ---
    @@ -953,7 +941,7 @@ public synchronized void close() throws IOException {
                     // is called. In this case, we don't have to actually 
close the file stream. Instead, we
                     // can just add it onto the queue and continue to use it 
for the next content claim.
                     final long resourceClaimLength = scc.getOffset() + 
scc.getLength();
    -                if (recycle && resourceClaimLength < maxAppendClaimLength) 
{
    +                if (recycle && resourceClaimLength < 
MAX_APPENDABLE_CLAIM_LENGTH) {
                         // we do not have to synchronize on the writable claim 
queue here because we
                         // are only adding something to the queue. We must 
synchronize if we are
                         // using a ResourceClaim from the queue and 
incrementing the claimant count on that resource
    --- End diff --
    
    Another comment that longer applies.  Leaving it in might confuse our 
future selves.


> Rare condition causes FileSystemRepository NPE
> ----------------------------------------------
>
>                 Key: NIFI-2551
>                 URL: https://issues.apache.org/jira/browse/NIFI-2551
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.0.0, 0.7.0
>            Reporter: Michael Moser
>            Assignee: Michael Moser
>            Priority: Blocker
>             Fix For: 1.0.0, 0.8.0
>
>
> In rare unpredictable cases when NiFi is processing a heavy load, we see 
> FileSystemRepository throw a NullPointerException
> {noformat}
> java.lang.NullPointerException
>     at o.a.n.c.r.FileSystemRepository$2.write(FileSystemRepository.java:918) 
> [nifi-framework-core-0.7.0.jar]
>     at 
> o.a.n.c.r.io.DisableOnCloseOutputStream.write(DisableOnCloseOutputStream.java:49)
>     ....
>     Suppressed: java.lang.NullPointerException
>         at 
> o.a.n.c.r.FileSystemRepository$2.flush(FileSystemRepository.java:934) 
> [nifi-framework-core-0.7.0.jar]
>         at 
> o.a.n.c.r.io.DisableOnCloseOutputStream.close(DisableOnCloseOutputStream.java:68)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to