git-annex/Remote
Joey Hess 58f727afdd resume interrupted chunked uploads
Leverage the new chunked remotes to automatically resume uploads.
Sort of like rsync, although of course not as efficient since this
needs to start at a chunk boundry.

But, unlike rsync, this method will work for S3, WebDAV, external
special remotes, etc, etc. Only directory special remotes so far,
but many more soon!

This implementation will also allow starting an upload from one repository,
interrupting it, and then resuming the upload to the same remote from
an entirely different repository.

Note that I added a comment that storeKey should atomically move the content
into place once it's all received. This was already an undocumented
requirement -- it's necessary for hasKey to work reliably. This resume code
just uses hasKey to find the first chunk that's missing.

Note that if there are two uploads of the same key to the same chunked remote,
one might resume at the point the other had gotten to, but both will then
redundantly upload. As before.

In the non-resume case, this adds one hasKey call per storeKey, and only
if the remote is configured to use chunks. Future work: Try to eliminate that
hasKey. Notice that eg, `git annex copy --to` checks if the key is present
before sending it, so is already running hasKey.. which could perhaps
be cached and reused.

However, this additional overhead is not very large compared with
transferring an entire large file, and the ability to resume
is certianly worth it. There is an optimisation in place for small files,
that avoids trying to resume if the whole file fits within one chunk.

This commit was sponsored by Georg Bauer.
2014-07-28 14:35:52 -04:00
..
Directory better Preparer interface 2014-07-27 00:30:04 -04:00
External factored out Utility.SimpleProtocol from the external special remote implementation 2014-04-05 13:29:28 -04:00
Helper resume interrupted chunked uploads 2014-07-28 14:35:52 -04:00
Rsync rsync special remote: Fix slashes when used on Windows. 2014-03-18 13:02:10 -04:00
WebDAV more DAV url fixes for windows 2014-02-25 16:16:14 -04:00
Bup.hs factor out getRemoteGitConfig 2014-05-16 16:08:20 -04:00
Ddar.hs remove odd character that snuck in somehow and broke build 2014-05-15 16:36:19 -04:00
Directory.hs fix handling of removal of keys that are not present 2014-07-28 14:14:01 -04:00
External.hs export CreateProcess fields from Utility.Process 2014-06-10 19:20:14 -04:00
GCrypt.hs Set gcrypt-publish-participants when setting up a gcrypt repository, to avoid unncessary passphrase prompts. 2014-07-15 17:33:14 -04:00
Git.hs optimise handling of unavailable repos 2014-07-15 14:45:27 -04:00
Glacier.hs fix build 2014-07-26 20:21:36 -04:00
Hook.hs export CreateProcess fields from Utility.Process 2014-06-10 19:20:14 -04:00
List.hs factor out getRemoteGitConfig 2014-05-16 16:08:20 -04:00
Rsync.hs rsync special remote: Fix slashes when used on Windows. 2014-03-18 13:02:10 -04:00
S3.hs S3: Deal with AWS ACL configurations that do not allow creating or checking the location of a bucket, but only reading and writing content to it. 2014-07-11 15:21:43 -04:00
Tahoe.hs Fix thaoe remote to work with latest tahoe (v. 1.10.0) 2014-03-26 00:31:02 +01:00
Web.hs add UrlOptions sum type 2014-02-24 22:00:25 -04:00
WebDAV.hs better exception display 2014-07-26 23:01:44 -04:00