dlwhdgus0810 opened a new pull request, #880: URL: https://github.com/apache/commons-io/pull/880
# [IO-460] Read newly appearing tailed files from the beginning When Tailer starts with `tailFromEnd=true` and the file is initially missing, it currently seeks to EOF when a later open succeeds. This drops lines written while Tailer was waiting for the file. Apply the EOF starting position only when the initial open succeeds. After a missing-file open, start at offset zero. The configured start mode and rotation handling remain intact. The regression runs Tailer synchronously with a real file-backed reader and controlled missing-file opens. Six cases cover zero, one, and two failed initial opens with both start modes. The two retry cases with `tailFromEnd=true` fail on the unmodified source and pass with this change. Issue: https://issues.apache.org/jira/browse/IO-460 Validation (macOS aarch64, BellSoft JDK 21.0.7, Maven 3.9.14): - `mvn -B -ntp -Dtest=TailerTest#testTailFromEndAfterInitialOpen test`: baseline 6 tests, 2 expected failures; fixed source 6 tests, no failures or skips. - `mvn -B -ntp` (repository default goals): BUILD SUCCESS; 6,622 tests, 0 failures, 0 errors, 33 skipped. Includes all 33 Tailer tests passing, covering existing-file start modes and rotation. - Required RAT, japicmp, Checkstyle (0 violations), SpotBugs (0 bugs/errors), PMD and Javadoc goals passed. The regression controls failed opens through `Tailable` and uses a real file-backed reader; it does not depend on a filesystem creation race or sleeps. Validation was limited to this macOS/JDK environment; the full-suite skipped cases were not exercised. -- 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]
