[
https://issues.apache.org/jira/browse/NIFI-2481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15922854#comment-15922854
]
Michael Moser commented on NIFI-2481:
-------------------------------------
After looking into this, I think the calculation is correct but the variable
name "maxArchiveBytes" doesn't exactly explain how it is used. A better name
is minRepositoryBytesForArchive.
Once the content repository disk usage exceeds this value, then archive files
are slowly purged to get below this percentage. If the archive is empty but
the content repository usage is still above this value, then archiving is
temporarily not used.
I believe the Admin Guide explanation of the
nifi.content.repository.archive.max.usage.percentage should be clarified.
Intuitively it implies how much of the content repository disk can be used for
the archive.
> FileSystemRepository: maxArchiveBytes calculated incorrectly
> ------------------------------------------------------------
>
> Key: NIFI-2481
> URL: https://issues.apache.org/jira/browse/NIFI-2481
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 0.7.0
> Reporter: Brandon DeVries
> Priority: Minor
>
> It appears as though the calculation of maxArchiveBytes in
> FileSystemRepository.java might be backwards. The line in question\[1\] is:
> {code}
> final long maxArchiveBytes = (long) (capacity * (1D - (maxArchiveRatio -
> 0.02)));
> {code}
> if you say capacity = 1000, then you get the following:
> maxArchiveRatio = .1 ==> maxArchiveBytes = 920
> maxArchiveRatio = .5 ==> maxArchiveBytes = 520
> maxArchiveRatio = .9 ==> maxArchiveBytes = 120
> In other words, as you increase the
> nifi.content.repository.archive.max.usage.percentage, you would be decreasing
> the bytes allowed for archiving...
> \[1\]
> https://github.com/apache/nifi/blob/rel/nifi-0.7.0/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java#L189
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)