fix: Tune NiFi startup defaults (election timeout, archive retention)#936
Conversation
|
I did not run the tests (yet) and I won't have time to do so today. I believe this should also not be necessary. If anyone could kick off a test run if you think it's needed I'd appreciate that. This is the result of a customer support issue. |
|
For reference: The retention period was default 7 days in NiFi 1.x and changed to 3 hours in 2.x https://issues.apache.org/jira/browse/NIFI-12132 The reason there was to make it more convenient to run locally but should be adjusted for prod so I did that. |
- Remove the operator override of nifi.cluster.flow.election.max.wait.time, letting NiFi's upstream default of 5 mins take effect. The previous 1-min override was left over from a "for testing" TODO in the operator and may have caused flow election to settle on incomplete vote sets in cold-start scenarios. - Set nifi.content.repository.archive.max.retention.period to "3 days". Previously empty, which NiFi interprets as Long.MAX_VALUE and disables time-based archive purge entirely. Without a time-based ceiling the content archive directory can accumulate millions of files, which makes the synchronous startup directory scan in FileSystemRepository very slow. Users requiring a longer content-replay window can override via configOverrides. The provenance audit trail is stored separately and is unaffected by this setting. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8bdfe8c to
27671a7
Compare
…secs" to avoid test timeouts (5min defaualt).
| properties.insert( | ||
| "nifi.cluster.flow.election.max.wait.time".to_string(), | ||
| "1 mins".to_string(), | ||
| ); |
There was a problem hiding this comment.
I often lower this as it's a real blocker for development.
WDYT of setting this to a very low value in case only a single replica is configured?
Description
Remove the operator override of nifi.cluster.flow.election.max.wait.time, letting NiFi's upstream default of 5 mins take effect. The previous 1-min override was left over from a "for testing" TODO in the operator and may have caused flow election to settle on incomplete vote sets in cold-start scenarios.
Set nifi.content.repository.archive.max.retention.period to "3 days". Previously empty, which NiFi interprets as Long.MAX_VALUE and disables time-based archive purge entirely. Without a time-based ceiling the content archive directory can accumulate millions of files, which makes the synchronous startup directory scan in FileSystemRepository very slow. Users requiring a longer content-replay window can override via configOverrides. The provenance audit trail is stored separately and is unaffected by this setting.
Definition of Done Checklist
Author
Reviewer
Acceptance