2
2
mirror of https://github.com/octoleo/restic.git synced 2024-09-27 22:19:02 +00:00
restic/internal/archiver
Michael Eischer 120ccc8754 repository: Rework blob saving to use an async pack uploader
Previously, SaveAndEncrypt would assemble blobs into packs and either
return immediately if the pack is not yet full or upload the pack file
otherwise. The upload will block the current goroutine until it
finishes.

Now, the upload is done using separate goroutines. This requires changes
to the error handling. As uploads are no longer tied to a SaveAndEncrypt
call, failed uploads are signaled using an errgroup.

To count the uploaded amount of data, the pack header overhead is no
longer returned by `packer.Finalize` but rather by
`packer.HeaderOverhead`. This helper method is necessary to continue
returning the pack header overhead directly to the responsible call to
`repository.SaveBlob`. Without the method this would not be possible,
as packs are finalized asynchronously.
2022-07-02 22:42:34 +02:00
..
archiver_test.go repository: Rework blob saving to use an async pack uploader 2022-07-02 22:42:34 +02:00
archiver_unix_test.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
archiver_windows_test.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
archiver.go repository: Rework blob saving to use an async pack uploader 2022-07-02 22:42:34 +02:00
blob_saver_test.go Return real size from SaveBlob 2022-07-02 18:55:12 +02:00
blob_saver.go Print number of bytes added to the repo 2022-07-02 18:55:12 +02:00
buffer.go archiver: Remove cleanup goroutine from BufferPool 2022-05-29 17:09:16 +02:00
doc.go archiver: Add high-level documentation 2018-05-12 23:55:54 +02:00
file_saver_test.go archiver: remove tomb usage 2022-06-05 15:47:52 +02:00
file_saver.go Print number of bytes added to the repo 2022-07-02 18:55:12 +02:00
scanner_test.go backup/scanner: Fix total size for overlapping targets 2021-01-29 11:31:36 +01:00
scanner.go backup/scanner: Fix total size for overlapping targets 2021-01-29 11:31:36 +01:00
testing_test.go Move internal/fs.TestChdir to internal/test.Chdir 2020-09-17 10:43:33 +02:00
testing.go archiver: Fix test 2022-03-28 22:09:49 +02:00
tree_saver_test.go archiver: remove tomb usage 2022-06-05 15:47:52 +02:00
tree_saver.go archiver: remove tomb usage 2022-06-05 15:47:52 +02:00
tree_test.go Remove a few redundant type specifiers 2020-10-06 14:55:13 +02:00
tree.go archiver/tree: Introduce functions Leaf() and NodeNames() 2021-01-29 11:11:28 +01:00