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

Mark Payne commented on NIFI-1726:
----------------------------------

This turns out to be quite a tricky edge case. We were able to set a breakpoint 
in the FileSystemRepository and track down the exact condition. The conditions 
that we see under which this will occur:

* We are expiring data from the archive based on Time, not based on amount of 
disk space used.
* When we go to delete a file based on time, we run into a file whose Last 
Modified Time exactly matches (to the millisecond) the timestamp that is our 
threshold for deleting data.

If both of these conditions occur, we end up in an infinite loop.
In FileSystemRepository, around line 1239, we have the following condition:
{code}
                if (freed < toFree || getLastModTime(toDelete.toPath()) < 
removalTimeThreshold) {
{code}

removalTimeThreshold is defined at the beginning of the method, and so we end 
up in a case where getLastModTime(...) == removalTimeThreshold but not less 
than. So this evaluates to false. As a result, we can step through the rest of 
the code to see an infinite loop occur.

> Archiver is not respecting 
> nifi.content.repository.archive.max.usage.percentage
> -------------------------------------------------------------------------------
>
>                 Key: NIFI-1726
>                 URL: https://issues.apache.org/jira/browse/NIFI-1726
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 0.6.0
>            Reporter: Christopher McDermott
>             Fix For: 1.0.0, 0.7.0, 0.6.1
>
>         Attachments: gcutil.out, nifi-td.txt, nifi-thread-dumps.tar.gz
>
>
> Content files are taking up more space than allowed to the point where the 
> disk becomes 100% full.
> I'll add the develop list email thread in the comments.



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

Reply via email to