fsspec / fsspec/filesystem_spec
Retry I/O operations on Windows
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 490
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 38
Description
As you well know, write/delete operations are exclusive under Windows. It is quite common to run into PermissionErrors trying to delete a file that is being scanned (read) by an antivirus.
I ran into one such issue over at https://github.com/PyTorchLightning/pytorch-lightning/issues/9705 and the consensus seems to be that this should be handled by the filesystem libraries instead of peppering retry logic all over other projects.
To that end, is it possible to add options to I/O operation that require exclusivity (file/directory write/delete) that control how many times to retry the operation with some "reasonable" sleep between each attempt? Ideally the default should be that under Windows these operations retry by default so we don't have to retrofit all the python libraries in existence. Users who wish such operations to fail-fast can then set retries=0 to get the old behavior.
Thoughts?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by reviewing the filesystem operation APIs and existing Windows-specific behavior, then determine which exclusive operations need configurable retries and how completion should be verified across platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100