Alexander Weiss
70347e95d5
disable index uploads for prune command
...
+ modifications of changelog
2020-06-12 09:24:38 +02:00
Alexander Weiss
91906911b0
Fix non-intuitive repository behavior
...
- The SaveBlob method now checks for duplicates.
- Moves handling of pending blobs to MasterIndex.
-> also cleans up pending index entries when they are saved in the index
-> when using SaveBlob no need to care about index any longer
- Always check for full index and save it when storing packs.
-> removes the need of an index uploader
-> also removes the verbose "uploaded intermediate index" messages
- The Flush method now also saves the index
- Fix race condition when checking and saving full/non-finalized indexes
2020-06-11 13:05:23 +02:00
MichaelEischer
cba6ad8d8e
Merge pull request #2711 from greatroar/update-x-net
...
Update golang.org/x/net for fewer allocations in http2
2020-05-25 20:43:29 +02:00
greatroar
c35c4e0cbf
Update golang.org/x/net for fewer allocations in http2
...
name old allocs/op new allocs/op delta
BackendREST/BenchmarkLoadFile-8 2.15k ± 0% 2.14k ± 0% -0.27% (p=0.002 n=20+20)
BackendREST/BenchmarkLoadPartialFile-8 587 ± 0% 582 ± 0% -0.88% (p=0.000 n=20+20)
BackendREST/BenchmarkLoadPartialFileOffset-8 584 ± 0% 579 ± 0% -0.90% (p=0.000 n=19+16)
The throughput isn't significantly higher or lower.
2020-05-24 16:39:17 +02:00
MichaelEischer
84475aa3a8
Merge pull request #2730 from greatroar/mount-build-tags
...
Simplify build tags for restic mount
2020-05-23 20:33:43 +02:00
MichaelEischer
f12f9ae240
Merge pull request #2741 from tbm/typos
...
Fix typos
2020-05-21 23:40:12 +02:00
Martin Michlmayr
5cc1760fdf
Fix typos
2020-05-16 14:05:26 +08:00
MichaelEischer
32ac5486e9
Merge pull request #2732 from restic/rawtaz-update-contributing
...
Reword parts of Providing Patches in CONTRIBUTING.md
2020-05-12 21:37:08 +02:00
rawtaz
c4336978eb
Reword parts of Providing Patches in CONTRIBUTION.md
...
Primarily makes the request that contributors create a new branch for their changes stand out more.
2020-05-12 14:03:57 +02:00
greatroar
649cbec6c5
Simplify build tags for restic mount
...
This command can only be built on Darwin, FreeBSD and Linux
(and if we upgrade bazil.org/fuse, only FreeBSD and Linux:
https://github.com/bazil/fuse/issues/224 ).
Listing the few supported operating systems explicitly here makes
porting restic to new platforms easier.
2020-05-12 11:30:41 +02:00
MichaelEischer
b17bd7f860
Merge pull request #2719 from greatroar/update-x-crypto
...
Update x/crypto to stop poly1305 segfaulting on ARM
2020-05-09 00:02:18 +02:00
greatroar
68f1e9c524
Update x/crypto to fix poly1305 on ARM
...
The broken poly1305 implementation for arm64 was removed, fixing the
segfault issue on arm64 (gh-2618). The version for amd64 has improved
performance, which shows up in the internal/repository benchmark:
name old speed new speed delta
SaveAndEncrypt-8 110MB/s ± 2% 113MB/s ± 1% +2.24% (p=0.000 n=20+20)
2020-05-05 11:05:35 +02:00
MichaelEischer
1ee2306033
Merge pull request #2717 from MichaelEischer/fix-flaky-password-prompt
...
backup: Avoid race between password prompt and open repository message
2020-05-01 23:58:55 +02:00
Michael Eischer
c882a92cd6
backup: Avoid race between password prompt and open repository message
...
`term.Print` sends the output via a channel to a goroutine which
actually prints the message. This may race with the password prompt
printed by `OpenRepository` resulting in a missing prompt.
2020-05-01 23:42:16 +02:00
MichaelEischer
f54db5d796
Merge pull request #2713 from greatroar/unused
...
Move Index.FindBlob to tests
2020-05-01 20:41:59 +02:00
MichaelEischer
843e7f404e
Merge pull request #2716 from MichaelEischer/revert-apfs-test-workaround
...
Revert "Darwin test fix: allow 1μs timestamp difference"
2020-05-01 18:13:38 +02:00
Michael Eischer
d465b5b9ad
Revert "Darwin test fix: allow 1μs timestamp difference"
...
This reverts commit f3016a9096
.
2020-05-01 17:11:30 +02:00
greatroar
9f7cd69f13
Move Index.FindBlob to tests
2020-04-29 10:57:01 +02:00
MichaelEischer
070d43e290
Merge pull request #2704 from azak-azkaran/patch-1
...
Update 030_preparing_a_new_repo.rst
2020-04-23 20:48:34 +02:00
MichaelEischer
d4bd32a37e
Merge pull request #2640 from greatroar/simplify-loadblob-usage
...
Simplify Repository.LoadBlob usage
2020-04-23 20:23:35 +02:00
greatroar
e7d7b85d59
Merge Repository.{LoadBlob,loadBlob}
...
Pushing the allocation logic down into the former loadBlob body means
that fewer allocations have to be performed:
name old time/op new time/op delta
LoadTree-8 478µs ± 1% 481µs ± 2% ~ (p=0.315 n=9+10)
LoadBlob-8 11.6ms ± 1% 11.6ms ± 2% ~ (p=0.393 n=10+10)
LoadAndDecrypt-8 13.3ms ± 3% 13.3ms ± 3% ~ (p=0.905 n=10+9)
LoadIndex-8 33.6ms ± 2% 33.2ms ± 1% -1.15% (p=0.028 n=10+9)
name old alloc/op new alloc/op delta
LoadTree-8 41.2kB ± 0% 41.1kB ± 0% -0.23% (p=0.000 n=10+10)
LoadBlob-8 2.28kB ± 0% 2.18kB ± 0% -4.21% (p=0.000 n=10+10)
LoadAndDecrypt-8 2.10MB ± 0% 2.10MB ± 0% ~ (all equal)
LoadIndex-8 5.22MB ± 0% 5.22MB ± 0% ~ (p=0.631 n=10+10)
name old allocs/op new allocs/op delta
LoadTree-8 652 ± 0% 651 ± 0% -0.15% (p=0.000 n=10+10)
LoadBlob-8 24.0 ± 0% 23.0 ± 0% -4.17% (p=0.000 n=10+10)
LoadAndDecrypt-8 30.0 ± 0% 30.0 ± 0% ~ (all equal)
LoadIndex-8 30.2k ± 0% 30.2k ± 0% ~ (p=0.610 n=10+10)
name old speed new speed delta
LoadBlob-8 86.4MB/s ± 1% 85.9MB/s ± 2% ~ (p=0.393 n=10+10)
LoadAndDecrypt-8 75.4MB/s ± 3% 75.4MB/s ± 3% ~ (p=0.858 n=10+9)
2020-04-23 10:04:20 +02:00
greatroar
be5a0ff59f
Centralize buffer allocation and size checking in Repository.LoadBlob
...
Benchmark results for internal/repository:
name old time/op new time/op delta
LoadTree-8 479µs ± 2% 478µs ± 1% ~ (p=0.780 n=10+9)
LoadBlob-8 11.6ms ± 2% 11.6ms ± 1% ~ (p=0.631 n=10+10)
LoadAndDecrypt-8 13.2ms ± 2% 13.3ms ± 3% ~ (p=0.631 n=10+10)
name old alloc/op new alloc/op delta
LoadTree-8 41.2kB ± 0% 41.2kB ± 0% ~ (all equal)
LoadBlob-8 2.28kB ± 0% 2.28kB ± 0% ~ (all equal)
LoadAndDecrypt-8 2.10MB ± 0% 2.10MB ± 0% ~ (all equal)
name old allocs/op new allocs/op delta
LoadTree-8 652 ± 0% 652 ± 0% ~ (all equal)
LoadBlob-8 24.0 ± 0% 24.0 ± 0% ~ (all equal)
LoadAndDecrypt-8 30.0 ± 0% 30.0 ± 0% ~ (all equal)
name old speed new speed delta
LoadBlob-8 86.2MB/s ± 2% 86.4MB/s ± 1% ~ (p=0.594 n=10+10)
LoadAndDecrypt-8 75.7MB/s ± 2% 75.4MB/s ± 3% ~ (p=0.617 n=10+10)
2020-04-23 10:04:20 +02:00
azak-azkaran
c5100d5632
Update 030_preparing_a_new_repo.rst
...
fixed markdown for wasabi region link
2020-04-23 09:24:19 +02:00
MichaelEischer
956a1b0f96
Merge pull request #2294 from BenWiederhake/debugsyms
...
build: Preserve debug symbols in debug build
2020-04-19 17:26:03 +02:00
Ben Wiederhake
fab626a3df
build: Preserve debug symbols in debug and profile build
...
Signed-off-by: Ben Wiederhake <BenWiederhake.GitHub@gmx.de>
2020-04-19 14:48:40 +02:00
MichaelEischer
4f00564574
Merge pull request #2621 from greatroar/fixes
...
Some small fixes
2020-04-18 18:07:08 +02:00
MichaelEischer
f77477129f
Merge pull request #2584 from greatroar/mount-cache-uid-gid
...
Cache uid and gid for top directories in internal/fuse
2020-04-18 17:45:14 +02:00
greatroar
2e31120f89
Remove unused argument to restic.fakeFile
2020-04-18 17:40:13 +02:00
greatroar
8fb2c0d3c1
Typo in crypto test name
2020-04-18 17:39:06 +02:00
greatroar
072cf7b02d
Fix debug messages in internal/fuse
2020-04-18 17:39:06 +02:00
greatroar
df66daa5c9
Fix context usage in backend tests
...
Found by go vet. This is also the only complaint is has.
2020-04-18 17:39:06 +02:00
MichaelEischer
9790d8ce1c
Merge pull request #2668 from MichaelEischer/fix-stats-blobs-crash
...
stats: Fix crash in blobs-per-file mode on missing blob
2020-04-18 17:21:26 +02:00
MichaelEischer
16710454f4
Merge pull request #2628 from MichaelEischer/one-element-pack-lists
...
cache: Don't sort one element pack lists
2020-04-18 17:09:06 +02:00
MichaelEischer
08ec6c9f17
Merge pull request #2677 from MichaelEischer/complain-about-invalid-indexes
...
rebuild_index: Report invalid packs that were ignored
2020-04-18 16:57:50 +02:00
MichaelEischer
7910ff4c0e
Merge pull request #2648 from nairb774/iowritestring
...
termstatus: Use io.WriteString to output messages.
2020-04-18 13:48:42 +02:00
MichaelEischer
c4da9d1e90
Merge pull request #2638 from greatroar/no-close-in-packer
...
Don't Close in Packer.Finalize
2020-04-18 13:07:21 +02:00
rawtaz
3ed61987a2
Merge pull request #2695 from restic/rawtaz-doc-exclude-file-tilde
...
doc: Add note on tilde expansion in exclude files
2020-04-18 13:01:17 +02:00
rawtaz
9dba7a2577
doc: Add note on tilde expansion in exclude files
...
Explains to the reader that tilde expansion does not work in exclude files, and that they should instead use the $HOME variable.
2020-04-18 12:47:47 +02:00
MichaelEischer
a1352906e2
Merge pull request #2622 from greatroar/optimize-packer-manager
...
Fix PackerManager benchmark and optimize hashing.Writer
2020-04-18 12:46:34 +02:00
MichaelEischer
b7c0d4d8bf
Merge pull request #2644 from greatroar/signal-notify-buffered
...
Make all signal.Notify channels buffered
2020-04-18 11:31:02 +02:00
MichaelEischer
f033850aa0
Merge pull request #2692 from MichaelEischer/fix-archiveraborttest
...
archiver: Fix race condition triggered by TestArchiverAbortEarlyOnError
2020-04-13 18:36:48 +02:00
Michael Eischer
bdf7ba20cb
archiver: Fix race condition triggered by TestArchiverAbortEarlyOnError
...
The Save methods of the BlobSaver, FileSaver and TreeSaver return early
on when the archiver is stopped due to an error. For that they select on
both the tomb.Dying() and context.Done() channels, which can lead to a
race condition when the tomb is killed due to an error: The tomb first
closes its Dying channel before canceling all child contexts.
Archiver.SaveDir only aborts its execution once the context was
canceled. When the tomb killing is paused between closing its Dying
channel and canceling the child contexts, this lets the
FileSaver/TreeSaver.Save methods return immediately, however, ScanDir
still reads further files causing the test case to fail.
As a killed tomb always cancels all child contexts and as the Savers
always use a context bound to the tomb, it is sufficient to just use
context.Done() as escape hatch in the Save functions. This fixes the
mismatch between SaveDir and Save.
Adjust the tests to use contexts bound to the tomb for all interactions
with the Savers.
2020-04-13 18:23:17 +02:00
rawtaz
3ee6b8ec63
Merge pull request #2689 from MichaelEischer/fix-background-hang
...
Fix shutdown hang when restic is started as background job
2020-04-12 22:39:44 +02:00
Michael Eischer
4a400f94bb
Add changelog
2020-04-12 22:27:09 +02:00
Michael Eischer
1a1c572bac
Fix shutdown hang when restic is started as background job
...
restic uses a cleanup hook to ensure that it restores the terminal
configuration to a sane state, when restic is interrupted while reading
a password from the terminal. However, this causes a problem, when
restic runs in a background job, as reconfiguring a terminal will cause
a SIGTTOU to be sent to restic pausing it. Therefore, restic seems to
hang on shutdown when it was running in the background.
This commit changes the behavior to only restore the terminal
configuration if restic was interrupted while reading a password from
the terminal. As reading a password from the terminal requires that
restic is in the foreground, this should avoid restic getting stopped.
Fixes #2298
Issue introduced in #402
2020-04-12 22:27:09 +02:00
rawtaz
5a7c27ddb6
Merge pull request #2681 from MichaelEischer/optimize-debug
...
Reduce memory usage and startup time of debug command
2020-04-04 00:08:14 +02:00
Michael Eischer
fb842759fc
debug: don't load the repository index
...
The existing commands don't need a loaded repository index which can
take several minutes to load on larger repositories.
2020-04-04 00:01:01 +02:00
Michael Eischer
7aa2f8a61e
debug: get stdout/stderr from gopts/globalOptions
2020-04-04 00:01:01 +02:00
Michael Eischer
08bf3bae79
debug: explicitly pass stdout to dump functions
2020-04-03 23:32:44 +02:00
rawtaz
e7b741b2d7
Merge pull request #2682 from MichaelEischer/cleanup-cli-paramter-names
...
Cleanup CLI parameter names for backup / global flags
2020-04-03 21:35:34 +02:00