-
Notifications
You must be signed in to change notification settings - Fork 4
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
Async filesystem implementation #283
base: main
Are you sure you want to change the base?
Conversation
The implementation simply wraps the synchronous file system already present in the code in asyncio coroutines.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #283 +/- ##
==========================================
- Coverage 93.99% 87.91% -6.09%
==========================================
Files 5 7 +2
Lines 383 422 +39
Branches 72 73 +1
==========================================
+ Hits 360 371 +11
- Misses 14 42 +28
Partials 9 9 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an advantage to implementing async in this way? I seem to remember s3fs doing the opposite, i.e. implementing all methods as async and then applying a sync_wrapper
on top of it for the syncs.
They inherit only from AsyncFileSystem
: https://github.com/fsspec/s3fs/blob/main/s3fs/core.py#L176
Happy for a discussion.
Generally, implementing only the async version and then wrapping it to make it blocking would be the more correct way, IMO. The problem is that the lakeFS high-level SDK does not expose an async API (and we rewrote our implementation based on that). If we wanted to go async-first, we have two options:
|
The implementation simply wraps the synchronous file system already present in the code in
asyncio
coroutines.Might serve as the first implementation for #279.