fix: resolve race condition in get_dir_file_info() when files are deleted concurrently#10407
fix: resolve race condition in get_dir_file_info() when files are deleted concurrently#10407gr8man wants to merge 1 commit into
Conversation
|
One question - do you not know how to perform On the topic of PR: after reading the directory, can there be a cache in the file system? Take a look at |
michalsn
left a comment
There was a problem hiding this comment.
Adding clearstatcache() would not solve the race because the file could disappear immediately afterward. More importantly, this fixes a deterministic bug: with $topLevelOnly = true, directories produce incomplete entries containing only relative_path.
We need a test, a changelog entry, and a small update to the PR description.
|
Those older commits were from accidentally staging files to the wrong branch, which led to me creating and then closing a few incorrect PRs. Sorry for the confusion — the current PR #10407 only contains the two relevant commits (fix + test). |
fb86f72 to
18bdafb
Compare
Description
Add null check in
get_dir_file_info()for whenget_file_info()returnsnull(race condition: file deleted afterreaddir()but beforeget_file_info()). This prevents broken entries and fixes random test failures inCommands. Includes unit test.Checklist: