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

    https://github.com/apache/nifi/pull/1460#discussion_r101427041
  
    --- Diff: 
nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
 ---
    @@ -972,11 +973,15 @@ public Integer getFlowElectionMaxCandidates() {
         }
     
         public String getFlowConfigurationArchiveMaxTime() {
    -        return getProperty(FLOW_CONFIGURATION_ARCHIVE_MAX_TIME, 
DEFAULT_FLOW_CONFIGURATION_ARCHIVE_MAX_TIME);
    +        return getProperty(FLOW_CONFIGURATION_ARCHIVE_MAX_TIME, null);
    --- End diff --
    
    @joewitt It used to have defaults here, for time 30 days, for storage 
500MB. These defaults are still effective if none of those are specified in 
nifi.properties. I just moved the code applying default values to here:
    
    ```java
    // FlowConfigurationArchiveManager
    public FlowConfigurationArchiveManager(final Path flowConfigFile, final 
NiFiProperties properties) {
    (...)
            if (maxCount == null && StringUtils.isBlank(maxTime) && 
StringUtils.isBlank(maxStorage)) {
                // None of limitation is specified, fall back to the default 
configuration;
                maxTime = 
NiFiProperties.DEFAULT_FLOW_CONFIGURATION_ARCHIVE_MAX_TIME;
                maxStorage = 
NiFiProperties.DEFAULT_FLOW_CONFIGURATION_ARCHIVE_MAX_STORAGE;
                logger.info("None of archive max limitation is specified, fall 
back to the default configuration, maxTime={}, maxStorage={}",
                        maxTime, maxStorage);
            }
    ```
    
https://github.com/apache/nifi/pull/1460/files#diff-00c47dfbe82807a330d4f2f9432bb54dR70
    
    The purpose of this is to let user only specify what they would like to use 
to limit the archiving. Some user want to limit by only archive file count and 
don't want to limit by size ... etc.
    To avoid keep archiving without any limit, the above code uses default time 
and storage size when no limit is configured.
    Does this sound reasonable?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to