ing-mattioni opened a new pull request, #11245:
URL: https://github.com/apache/nifi/pull/11245

   # Summary
   
   [NIFI-15938](https://issues.apache.org/jira/browse/NIFI-15938)
   
   This pull request updates `TailFile` to improve multi-file startup behavior 
and make persisted state recovery more robust.
   
   The changes focus on startup performance, rollover state restoration, 
malformed persisted state handling, read-loop buffer behavior, and buffer-size 
validation.
   
   ## Changes
   
   - Improves multi-file startup by replacing eager file listing with streaming 
file discovery
   - Replaces repeated state membership checks with `HashSet` membership
   - Restores persisted `tailingPostRollover` state correctly
   - Avoids recovery failures when rollover state exists but no rolled files 
remain
   - Hardens recovery against malformed persisted numeric and checksum state
   - Fixes buffer reuse in the read loop
   - Tightens buffer-size validation to prevent zero-sized or overflow-sized 
buffers
   - Adds regression tests for the fixed TailFile scenarios
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [x] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI-15938) 
issue created
   
   ### Pull Request Tracking
   
   - [x] Pull Request title starts with Apache NiFi Jira issue number, such as 
`NIFI-00000`
   - [x] Pull Request commit message starts with Apache NiFi Jira issue number, 
as such `NIFI-00000`
   - [x] Pull request contains commits signed with a registered key indicating 
`Verified` status
   
   ### Pull Request Formatting
   
   - [x] Pull Request based on current revision of the `main` branch
   - [x] Pull Request refers to a feature branch with one commit containing 
changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request 
creation.
   
   ### Build
   
   - [ ] Build completed using `./mvnw clean install -P contrib-check`
     - [ ] JDK 21
     - [ ] JDK 25
   
   Module-level verification performed:
   
   `.\mvnw.cmd --% -pl :nifi-standard-processors -am 
-Dtest=TestTailFile,TestTailFileSimpleScenarios,TestTailFileGeneratedScenarios 
-Dsurefire.failIfNoSpecifiedTests=false test`
   
   Additional verification performed:
   
   `.\mvnw.cmd --% -pl :nifi-standard-processors -Pcontrib-check validate`
   
   ### Licensing
   
   - [x] New dependencies are compatible with the Apache License 2.0
   - [x] New dependencies are documented in applicable `LICENSE` and `NOTICE` 
files
   
   No new dependencies were added.
   
   ### Documentation
   
   - [x] Documentation formatting appears as expected in rendered files
   
   No user-facing documentation files were changed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to