[#98] fstree: Do not fail iteration over just removed files #157

Merged
fyrchik merged 1 commit from carpawell/frostfs-node:fix/fstree-iteration-over-deleted-files into master 2023-03-22 07:26:28 +00:00
Member

A directory is read and files are saved to a local variable. The iteration
over such files may lead to a non-existing files reading due to a normal SN
operation cycle and, therefore, may lead to a returning the OS error to a
caller. Skip just removed (or lost) files as the golang std library does in
similar situations:
5f1a0320b9/src/os/dir_unix.go (L128-L133).

Signed-off-by: Pavel Karpy p.karpy@yadro.com

Closes #98. It seems like it was not related to the WC or some sort of an external data removing: just a removed file while FSTree iteration by the WC.

A directory is read and files are saved to a local variable. The iteration over such files may lead to a non-existing files reading due to a normal SN operation cycle and, therefore, may lead to a returning the OS error to a caller. Skip just removed (or lost) files as the golang std library does in similar situations: https://github.com/golang/go/blob/5f1a0320b92a60ee1283522135e00bff540ea115/src/os/dir_unix.go#L128-L133. Signed-off-by: Pavel Karpy <p.karpy@yadro.com> Closes #98. It seems like it was not related to the WC or some sort of an external data removing: just a removed file while FSTree iteration by the WC.
carpawell self-assigned this 2023-03-21 18:35:33 +00:00
carpawell added 1 commit 2023-03-21 18:35:34 +00:00
A directory is read and files are saved to a local variable. The iteration
over such files may lead to a non-existing files reading due to a normal SN
operation cycle and, therefore, may lead to a returning the OS error to a
caller. Skip just removed (or lost) files as the golang std library does in
similar situations:
5f1a0320b9/src/os/dir_unix.go (L128-L133).

Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
carpawell requested review from storage-core-committers 2023-03-21 18:35:43 +00:00
carpawell requested review from storage-core-developers 2023-03-21 18:35:44 +00:00
acid-ant approved these changes 2023-03-22 05:59:09 +00:00
fyrchik approved these changes 2023-03-22 07:22:56 +00:00
fyrchik reviewed 2023-03-22 07:25:19 +00:00
fyrchik approved these changes 2023-03-22 07:26:21 +00:00
fyrchik merged commit da8da1c63a into master 2023-03-22 07:26:28 +00:00
carpawell deleted branch fix/fstree-iteration-over-deleted-files 2023-03-22 08:56:22 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#157
No description provided.