Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call cat_ranges in blockcache for async filesystems #1336

Merged
merged 2 commits into from
Mar 30, 2025

Conversation

monken
Copy link
Contributor

@monken monken commented Aug 19, 2023

The CachingFileSystem can benefit from calling cat_ranges for asynchronous filesystems to concurrently download blocks. This speeds up filling the cache significantly for filesystems like HTTP and S3FS.

@monken monken force-pushed the blockcache-cat-ranges branch 3 times, most recently from 1c95789 to 09d06d8 Compare August 19, 2023 20:12
@monken monken force-pushed the blockcache-cat-ranges branch from 09d06d8 to 46ea642 Compare September 1, 2023 13:22
@martindurant
Copy link
Member

Sorry I let this one slide - I still think it's useful. I have just the one comment above.

@monken monken force-pushed the blockcache-cat-ranges branch from 46ea642 to 1fd8c23 Compare October 4, 2023 15:44
@martindurant
Copy link
Member

Can you please solve the conflict, and I can have another look?

@monken monken force-pushed the blockcache-cat-ranges branch from 1fd8c23 to 4dbb984 Compare March 30, 2025 00:44
@monken monken force-pushed the blockcache-cat-ranges branch from 4dbb984 to a048e26 Compare March 30, 2025 00:45
@monken
Copy link
Contributor Author

monken commented Mar 30, 2025

@martindurant sorry that I abandoned this for so long. I fixed the merge conflicts and updated the tests. Please let me know if you still deem this valuable.

@martindurant martindurant merged commit c710581 into fsspec:master Mar 30, 2025
10 checks passed
@@ -37,6 +37,7 @@
logger = logging.getLogger("fsspec")

Fetcher = Callable[[int, int], bytes] # Maps (start, end) to bytes
MultiFetcher = Callable[list[[int, int]], bytes] # Maps [(start, end)] to bytes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @monken @martindurant,

Unfortunately, this change breaks the usage of this library in Python 3.8. It's simple to reproduce:

from typing import Callable
X = Callable[list[[int, int]], bytes]

Would it be possible to yank 2025.3.1 (at least while support for 3.8 is still being maintained)? Thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will yank, but I 2025.3.1 will henceforth only support >=3.9; it should have probably been done before now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants