Mark Payne created NIFI-1644:
--------------------------------

             Summary: If unable to write to Content Repository, Process Session 
should automatically roll itself back
                 Key: NIFI-1644
                 URL: https://issues.apache.org/jira/browse/NIFI-1644
             Project: Apache NiFi
          Issue Type: Bug
          Components: Core Framework
            Reporter: Mark Payne
             Fix For: 0.7.0


If we write to the Content Repository and get an IOException (for example, out 
of disk space), the ProcessSession catches this and then removes the temporary 
content claim and then throws a FlowFileAccessException. However, the entire 
session really should be rolled back, because the FlowFIle no longer has a 
valid Content Claim. An example of this is in the StandardProcessSession.write 
method:

{code}
} catch (final FlowFileAccessException ffae) {
            resetWriteClaims(); // need to reset write claim before we can 
remove the claim
            destroyContent(newClaim);
            throw ffae;
}
{code}

Processors that then catch Throwable or the general Exception and route to 
failure pass along an invalid FlowFile. We end up seeing the following in the 
logs:

{code}
2016-03-17 04:21:04,742 WARN [Timer-Driven Process Thread-17] 
o.a.n.c.r.WriteAheadFlowFileRepository Repository Record 
StandardRepositoryRecord[UpdateType=CONTENTMISSING,Record=StandardFlowFileRecord[uuid=01efcc28-e28f-45ab-9373-cba8933a010c,claim=StandardContentClaim
 [resourceClaim=StandardResourceClaim[id=1458188464723-45209, container=pub1, 
section=153], offset=0, 
length=1017],offset=0,name=26304456091229115,size=1017]] is marked to be 
aborted; it will be persisted in the FlowFileRepository as a DELETE record
{code}



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

Reply via email to