1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-25 23:43:49 +00:00
Commit graph

7880 commits

Author SHA1 Message Date
Thomas Waldmann
142eb65223
upgrade codecov-action to v3 2023-02-09 18:46:36 +01:00
TW
406da3d419
Merge pull request #7325 from ThomasWaldmann/hashtable-fixes-master
hashindex bugfix and refactoring (master)
2023-02-08 23:53:24 +01:00
Thomas Waldmann
316bb7c937
add num_entries assertion 2023-02-08 22:45:11 +01:00
Thomas Waldmann
b79766a933
hashindex: simplify size_idx function
Thanks to @jdchristensen for the code.
2023-02-08 22:11:49 +01:00
Thomas Waldmann
a13d53ec1e
Simplify full HT scan assertion 2023-02-08 22:11:47 +01:00
Thomas Waldmann
4fc7815f11
hashindex: always have at least 1 empty bucket
avoid rounding / integer conversion issues bringing this down to 0.
2023-02-08 22:11:44 +01:00
Thomas Waldmann
4f8c4aea19
implement ht idx wrap around less strangely, add comment 2023-02-08 22:11:43 +01:00
Thomas Waldmann
907da00931
if HT is full with entries and tombstones: give up/fail early 2023-02-08 22:11:41 +01:00
Thomas Waldmann
0098ac9e63
more comments for hashindex_lookup 2023-02-08 22:11:34 +01:00
Thomas Waldmann
9bf352d00c
bugfix: do not resize hashindex with wrong num_empty
otherwise we would lose the decrement operation on num_empty.
2023-02-08 22:10:50 +01:00
TW
070c260460
Merge pull request #7327 from RayyanAnsari/pyinstaller-no-icon
pyinstaller: remove icon
2023-02-08 19:09:17 +01:00
Rayyan Ansari
37e958bfa4
pyinstaller: remove icon
Remove pyinstaller's default executable icon by setting it to the string 'NONE'.

While we're at it, update a comment.
2023-02-08 17:53:33 +00:00
Thomas Waldmann
83e6b4269e
hashindex: simplify assert 2023-02-08 16:25:15 +01:00
Thomas Waldmann
c9573c04ac
_hashindex: easier to understand code, dubious loops removed, asserts
hashindex_index returns the perfect hashtable index, but does not
check what's in the bucket there, so we had these loops afterwards
to search for an empty or deleted bucket.

problem: if the HT were completely filled with no empty and no deleted
buckets, that loop would never end. due to our HT resizing, it can
never happen, but still not pretty.

when using hashindex_lookup (as also used some lines above), the code
is easier to understand, because (after we resized the HT), we freshly
create the same situation as after the first call of that function:
- return value < 0, because we (still) can not find the key
- start_idx will point to an empty bucket

Thus, we do not need the problematic loops we had there.

Modified the checks to make sure we really have an empty or deleted
bucket before overwriting it with data.

Added some additional asserts to make sure the code behaves.
2023-02-08 14:51:54 +01:00
TW
978cb163e6
Merge pull request #7324 from ThomasWaldmann/hashtable-stresstests-master
add hashtable stress tests
2023-02-08 14:48:58 +01:00
Thomas Waldmann
3e33656238
add comment about how to provoke more collisions 2023-02-08 02:13:14 +01:00
Thomas Waldmann
9697f55534
add hashtable stress tests
Using NSIndex (repo index) HashIndex, but they all are very similar.
2023-02-08 01:53:30 +01:00
Thomas Waldmann
516c070c7c
fix tests for platformdirs 3.x.x 2023-02-07 21:14:16 +01:00
TW
653c051851
Merge pull request #7323 from ThomasWaldmann/coala-updates
coala: remove PEP8Bear
2023-02-06 23:40:52 +01:00
Thomas Waldmann
f29ff128fb
require 3.x.x releases of platformdirs
we don't want to suddenly/unexpectedly break stuff for borg users
just because platformdirs does a breaking release.

at platformdirs 2.0.0 macOS config dir changed.
at platformdirs 3.0.0 macOS config dir changed again.
at platformdirs 4.0.0 (future) - who knows?
2023-02-06 23:24:56 +01:00
Thomas Waldmann
de275fc8db
coala: remove PEP8Bear
it's not always happy with what black does.
2023-02-05 20:59:43 +01:00
TW
a3bdae65ac
Merge pull request #7322 from ThomasWaldmann/update-changes
update CHANGES
2023-02-05 00:06:11 +01:00
Thomas Waldmann
55af2933fb
update CHANGES 2023-02-04 20:43:50 +01:00
Thomas Waldmann
d9875a4d7e
improve test_get_security_dir 2023-02-04 18:23:35 +01:00
Thomas Waldmann
078bb7ee02
improve test_get_keys_dir 2023-02-04 18:19:15 +01:00
Thomas Waldmann
6ab424598d
improve test_get_cache_dir 2023-02-04 18:17:43 +01:00
Thomas Waldmann
4bacd0b722
improve test_get_config_dir 2023-02-04 18:15:57 +01:00
Thomas Waldmann
bb73e8682f
fix win2 typo 2023-02-04 18:11:28 +01:00
Thomas Waldmann
499e5133b5
test_config_dir_compat: don't test on win32
there is no old borg < 2.0 there anyway.
2023-02-04 01:18:16 +01:00
Thomas Waldmann
bde0f11e1e
get_security_dir: legacy=False default 2023-02-04 00:35:04 +01:00
Thomas Waldmann
1d4810af23
get_keys_dir: legacy=False default 2023-02-04 00:35:03 +01:00
Thomas Waldmann
b06dd1c66c
get_config_dir: legacy=False default 2023-02-04 00:35:01 +01:00
Thomas Waldmann
ebcda6f0a5
get_cache_dir: legacy=False default 2023-02-04 00:34:57 +01:00
Thomas Waldmann
424be763b2
get_base_dir: legacy=False default 2023-02-04 00:34:54 +01:00
Thomas Waldmann
81595a9ca0
conftest.py: use BORG_BASE_DIR to redirect borg testing .config/.cache into a temp dir
XDG_*_HOME is not honoured on macOS and on Windows if we use platformdirs.
2023-02-04 00:34:52 +01:00
Thomas Waldmann
fddf6afded
get_*_dir: make legacy=... kwarg only
it's better readable.
2023-02-04 00:34:45 +01:00
Thomas Waldmann
437b5fa859
do not fail on macOS due to different dirs from platformdirs 2023-02-04 00:34:42 +01:00
Thomas Waldmann
8379ecefaa
deal with BORG_BASE_DIR 2023-02-04 00:34:26 +01:00
Thomas Waldmann
d3d909ad31
add compatibility test: legacy vs. non-legacy platformdirs 2023-02-03 18:22:51 +01:00
Rayyan Ansari
6c7efbe128
add platformdirs to dependencies 2023-02-03 17:46:56 +01:00
Rayyan Ansari
f2452aef2a
helpers: use platformdirs on win32 2023-02-03 17:46:49 +01:00
TW
7ffd87739b
Merge pull request #7320 from ThomasWaldmann/transfer-progress
Transfer progress
2023-02-03 03:06:32 +01:00
Thomas Waldmann
7ad25ba9e2
transfer: support --progress 2023-02-03 02:10:29 +01:00
TW
63a0b3bed4
Merge pull request #7310 from ThomasWaldmann/avoid-orphan-content-chunks2
avoid orphan content chunks on BackupOSErrors
2023-02-03 02:08:49 +01:00
TW
c96c5652b0
Merge pull request #7317 from pgerber/hanging-test
Fix test hanging reading FIFO when `borg create` failed
2023-02-03 01:59:15 +01:00
Thomas Waldmann
ffe32316a5
avoid orphan content chunks on BackupOSError, fixes #6709
if we run into some issue reading an input file, e.g. an I/O error,
the BackupOSError exception raised due to that will skip the current
file and no archive item will be created for this file.

But we maybe have already added some of its content chunks to the repo,
we have either written them as new chunks or incref'd some identical chunk
in the repo.

Added an exception handler that decrefs (and deletes if refcount reaches 0)
these chunks again before re-raising the exception, so the repo is in a
consistent state again and we do not have orphaned content chunks in the repo.
2023-02-03 01:35:12 +01:00
TW
9b7647c89d
Merge pull request #7309 from ThomasWaldmann/no-part-files-in-final-archive
remove part files from final archive
2023-02-03 01:33:47 +01:00
Peter Gerber
8ce3d22358 Fix test hanging reading FIFO when borg create failed 2023-02-02 00:44:08 +01:00
TW
f25f6a8e33
Merge pull request #7315 from ThomasWaldmann/pythonioencoding
document another way to get UTF-8 encoding on stdin/stdout/stderr, fixes #2273
2023-02-02 00:35:21 +01:00
TW
6d53cd0365
Merge pull request #7316 from ThomasWaldmann/gh-fixed-black-version
fix black versions be 23.x
2023-02-02 00:34:08 +01:00