[BUG] isfile/isfolder for non-existent items takes ~50s
See original GitHub issueWhat happened:
Calling isile
+ isfolder
for path abfs://c/f/2/3
when container & folder c/f/2/
exists but file 3
does not takes 25s
+ 25s
.
What you expected to happen:
Expect to take < 1s, not 25s + 25s because calling the same az storage blob exists ....
takes < 1s to get the error. This is extra surprising/negative due to asyncio support not landing yet or abfs, so it will block all other users of the python process
Minimal Complete Verifiable Example:
%%time
storage_options = {
'account_name': os.environ['AZ_STORAGE_ACCOUNT_NAME'],
'account_key': os.environ['AZ_STORAGE_ACCOUNT_KEY']
}
fs = fsspec.filesystem('abfs', **storage_options)
print(fs.isfile(path), fs.isdir(path))
Environment:
RAPIDS 0.19 stable (conda):
fsspec '2021.07.0'
dask ‘2021.04.0’
ubuntu
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Top Results From Across the Web
[BUG] isfile/isfolder for non-existent items takes ~50s #261
What happened: Calling isile + isfolder for path abfs://c/f/2/3 when container & folder c/f/2/ exists but file 3 does not takes 25s +...
Read more >Excessive calls to File.isDirectory() cause performance problems
File to log calls to this method showed two things: 1. ... MasterFS changes, you are probably the right one to take care...
Read more >Better way to check if a Path is a File or a Directory?
From How to tell if path is file or directory: ... IsDirectory()); // non-existing directory, FileAttributes not conclusive, rely on type of FileSystemInfo ......
Read more >Python: Check if a File or Directory Exists - GeeksforGeeks
isfile () method in Python is used to check whether the specified path is an existing regular file or not. Syntax: os.path.isfile(path).
Read more >How to Delete This is No Longer located Files for Error "Verify ...
If you get the error "Could not find this item. This is no longer located in (path). Verify the items location and try...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Would you mind trying the master branch? The await error is due to an error is fixed there.
Checked – the warning is gone, but wrong result + dir exists check is slowly downloading everything (afaict) instead of just checking: https://github.com/dask/adlfs/issues/265