-
Notifications
You must be signed in to change notification settings - Fork 7
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
Atomic UrlOperations.upload for ssh- and file-URLs #649
base: main
Are you sure you want to change the base?
Conversation
0c248eb
to
8c7fc58
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #649 +/- ##
==========================================
+ Coverage 92.47% 93.10% +0.62%
==========================================
Files 183 171 -12
Lines 12346 11992 -354
Branches 1890 1809 -81
==========================================
- Hits 11417 11165 -252
+ Misses 727 639 -88
+ Partials 202 188 -14 ☔ View full report in Codecov by Sentry. |
This commit fixes the arguments to `UrlOperationsRessourceUnknown` and `UrlOperationsRemoteError` in `FileUrlOperations.upload()`. A regression test for `UrlOperationsRemoteError` is added as well.
This commit adds an atomic upload for files. This can prevent errors where two threads are writing to the same file concurrently.
8c7fc58
to
407abfb
Compare
This commit adds return statements to the methods `FileUrlOperations.delete` and `FileUrlOperations.upload` to ensure that the expected return types are in fact returned in all cases, instead of returning `None`.
This PR addresses issue datalad-ria #102 and touches on issue #454 where atomic upload operations are discussed as well.
The PR also adds atomic upload to files. This can prevent data loss in the case where two threads write to the same file concurrently.
All ssh- and file-uploads should be atomic, which means an
atomic
-parameter that controls atomicity on a per-call basis is not necessary.