Repository navigation
tail: switch to polling when the directory is removed after the file event - #16898
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
GNU testsuite comparison: |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
With -F, the removal of the followed file can be handled while its directory still exists. The later removal of the directory was then ignored, so tail never reverted to polling and missed the file when it was recreated. Whether this happens depends on timing: on CI, tests/tail/inotify-dir-recreate failed in 33 of the last 45 GNU test runs, while locally it rarely shows up unless the machine is loaded.
Move the 'directory containing watched file was removed' reporting out of handle_event so the removal of the directory itself uses it directly, instead of replaying a file removal event through handle_event.
tail checks --pid once per sleep interval, which was the same 1s as the delay the test leaves after killing the process. On a slow runner, the last append could then wake tail before it noticed the process was gone, and get printed. Use -s.1 so the check happens well within that delay. See uutils#16681
7d17aba to
a93fce0
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Merging this PR will degrade performance by 4.53%2 warnings, 2 notes
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
With -F, if the followed file's removal was handled while its directory still existed, the later
removal of the directory was ignored, so tail never switched to polling. The directory's own
removal event is now handled too, which fixes the flaky tests/tail/inotify-dir-recreate (see
#4294).