2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-07 19:40:49 +00:00
restic/internal/restic
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
..
testdata forget: Add --keep-within-hourly (and friends) 2021-07-24 16:14:43 +00:00
backend_find_test.go Improve error reporting from restic diff 2020-11-11 16:40:40 +01:00
backend_find.go Quote snapshot prefix in error string 2021-08-25 16:11:28 +02:00
backend.go upgrade_repo_v2: Use atomic replace for supported backends 2022-05-09 22:31:30 +02:00
blob_set.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
blob_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
blob.go repository: implement pack compression 2022-04-30 11:34:10 +02:00
buffer.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
config_test.go init: Add flag to specify created repository version 2022-04-30 10:07:42 +02:00
config.go init: Enable compression support by default 2022-05-09 22:31:30 +02:00
doc.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
duration_test.go Extend custom Duration granularity to hours and add tests 2018-11-14 17:27:02 +01:00
duration.go Extend custom Duration granularity to hours and add tests 2018-11-14 17:27:02 +01:00
file_test.go Use "pack file" instead of "data file" (#2885) 2020-08-16 11:16:38 +02:00
file.go Simplify cache logic 2021-09-03 21:01:00 +02:00
find_test.go Limit number of large tree blobs loaded in parallel by StreamTrees 2022-02-19 12:26:09 +01:00
find.go Limit number of large tree blobs loaded in parallel by StreamTrees 2022-02-19 12:26:09 +01:00
hardlinks_index_test.go Merge a few variable declaration and initializations 2020-09-05 10:05:34 +02:00
hardlinks_index.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
id_int_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
id_test.go restic: Make JSON unmarshal for ID more efficient 2019-04-13 13:38:39 +02:00
id.go internal/restic: Custom ID.MarshalJSON 2022-05-27 12:26:37 +02:00
ids_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
ids.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
idset_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
idset.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
lock_test.go Update Lock.Time in lock.Refresh() 2019-09-04 11:38:35 -07:00
lock_unix.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
lock_windows.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
lock.go all: Move away from pkg/errors, easy cases 2022-06-14 08:36:38 +02:00
mknod_unix.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
node_aix.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
node_darwin.go Make restic.{lchown,mknod} regular functions 2021-05-27 22:51:40 +02:00
node_freebsd.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
node_linux.go Make restic.{lchown,mknod} regular functions 2021-05-27 22:51:40 +02:00
node_netbsd.go Make restic.{lchown,mknod} regular functions 2021-05-27 22:51:40 +02:00
node_openbsd.go Make restic.{lchown,mknod} regular functions 2021-05-27 22:51:40 +02:00
node_solaris.go [#issue 3127] Add xattr support for Solaris 2022-02-13 14:24:37 +05:30
node_test.go Fix test failures on Solaris 2022-01-25 18:05:56 -08:00
node_unix_test.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
node_unix.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
node_windows.go Make restic.{lchown,mknod} regular functions 2021-05-27 22:51:40 +02:00
node_xattr.go [#issue 3127] Add xattr support for Solaris 2022-02-13 14:24:37 +05:30
node.go golangci-lint: replace deprecated golint with revive 2022-03-28 22:33:17 +02:00
readerat.go Properly wrap errors in readerat helper 2021-05-17 21:08:23 +02:00
repository.go repository: Rework blob saving to use an async pack uploader 2022-07-02 22:42:34 +02:00
rewind_reader_test.go panic if hash returns an error 2021-08-04 22:17:46 +02:00
rewind_reader.go panic if hash returns an error 2021-08-04 22:17:46 +02:00
snapshot_find_test.go copy/find/ls/recover/stats: Memorize snapshot listing before index 2022-04-09 12:26:30 +02:00
snapshot_find.go copy/find/ls/recover/stats: Memorize snapshot listing before index 2022-04-09 12:26:30 +02:00
snapshot_group.go Merge a few variable declaration and initializations 2020-09-05 10:05:34 +02:00
snapshot_policy_test.go forget: Add --keep-within-hourly (and friends) 2021-07-24 16:14:43 +00:00
snapshot_policy.go forget: Ensure future snapshots do not affect --keep-within-* 2021-07-24 16:14:43 +00:00
snapshot_test.go Allow --tag and --keep-tag to match untagged snapshots 2021-08-02 23:06:20 +02:00
snapshot.go copy/find/ls/recover/stats: Memorize snapshot listing before index 2022-04-09 12:26:30 +02:00
tag_list_test.go feat(tags): Create Flatten() method 2020-12-29 10:59:46 +01:00
tag_list.go feat(tags): Create Flatten() method 2020-12-29 10:59:46 +01:00
testing_test.go copy/find/ls/recover/stats: Memorize snapshot listing before index 2022-04-09 12:26:30 +02:00
testing.go repository: Rework blob saving to use an async pack uploader 2022-07-02 22:42:34 +02:00
tree_stream.go Limit number of large tree blobs loaded in parallel by StreamTrees 2022-02-19 12:26:09 +01:00
tree_test.go repository: Rework blob saving to use an async pack uploader 2022-07-02 22:42:34 +02:00
tree.go internal/restic: Don't allocate in Tree.Insert 2021-09-26 18:08:48 +02:00