Dan Christensen
2f9f22e2a8
hashindex.py: make black happy
2023-02-11 20:33:07 -05:00
Dan Christensen
36aa395e49
_hashindex.c: set min_empty and num_empty even when permit_compact=True
2023-02-11 20:11:09 -05:00
Dan Christensen
60bea46eb7
_hashindex.c: rewrite hashindex_compact
2023-02-11 20:10:02 -05:00
Dan Christensen
6f5efb3f74
testsuite/hashindex.py: create and use compare_compact to avoid repetition
2023-02-11 20:06:38 -05:00
Dan Christensen
d3fd93f82b
testsuite/hashindex.py: use compare_indexes in one more spot
2023-02-11 19:53:28 -05:00
Dan Christensen
cc78ef8939
testsuite/hashindex.py: add two more tests
2023-02-11 19:44:56 -05:00
Dan Christensen
6aa53a5627
hashindex_pytest.py: add test_hashindex_compact_stress
2023-02-11 19:13:20 -05:00
Dan Christensen
51b29ab426
hashindex.py: make .compact tests independent of order
2023-02-11 17:37:53 -05:00
Dan Christensen
133ffebc8d
hashindex_pytest.py: factor out verify_hash_table
2023-02-11 17:37:20 -05:00
TW
6db21fa330
Merge pull request #7344 from RayyanAnsari/parseformat-rm-hack
...
parseformat: remove Windows-specific hack
2023-02-11 18:23:47 +01:00
TW
098fca7861
Merge pull request #7343 from ThomasWaldmann/timestamp-comparisons-master
...
relaxed timestamp comparisons (master)
2023-02-11 18:15:02 +01:00
Rayyan Ansari
03a27654e0
parseformat: remove Windows-specific hack
...
This fixes the rest of the tests.
2023-02-11 16:32:19 +00:00
Thomas Waldmann
aee17a87e2
tests: use same_ts_ns for all timestamp comparisons
2023-02-11 17:08:56 +01:00
TW
d90ebc8bef
Merge pull request #7340 from ThomasWaldmann/fix-recreate-rechunkify-master
...
recreate: --chunker-params must default to None, fixes #7337
2023-02-11 14:11:03 +01:00
TW
ce04521a9a
Merge pull request #7333 from ThomasWaldmann/excluded-included-status-chars
...
better included/excluded status chars, docs, fixes #7321
2023-02-11 13:48:43 +01:00
TW
f39d1bcd7b
Merge pull request #7334 from ThomasWaldmann/list-progress-json-is-nice
...
allow mixing --progress and --list in log-json mode
2023-02-11 13:42:59 +01:00
Thomas Waldmann
2ef09eaa77
same_ts_ns: add a timestamp comparison function
...
also: HAVE_UTIMES means 1us resolution (*)
(*) at least as far as the utimes() call is concerned.
Whether there are other limitations has to be seen.
2023-02-11 01:19:01 +01:00
TW
b233dbb4db
Merge pull request #7339 from ThomasWaldmann/test-dir-mtime-master
...
add test for extracted directory mtime (master)
2023-02-11 01:13:32 +01:00
Thomas Waldmann
ce5f1589ea
recreate: --chunker-params must default to None, fixes #7336
...
also add a test: recreate without --chunker-params shall not rechunk
before the fix, it triggered rechunking if an archive
was created with non-default chunker params.
but it only should rechunk if borg recreate is invoked with explicitly giving --chunker-params=....
2023-02-11 01:08:01 +01:00
Thomas Waldmann
fdc48fdd1b
more directory timestamp tests
2023-02-11 00:42:30 +01:00
Thomas Waldmann
a42cd161de
add test for extracted directory mtime
2023-02-11 00:29:57 +01:00
Thomas Waldmann
ff564de1cc
allow mixing --progress and --list in log-json mode
2023-02-10 01:45:59 +01:00
Thomas Waldmann
303c474f21
better included/excluded status chars, docs, fixes #7321
...
more consistent now between dry-run and non-dry-run mode.
--filter=... users might need to update the status chars they filter for.
2023-02-10 01:13:21 +01:00
TW
366731ba00
Merge pull request #7300 from RayyanAnsari/borg-platformdirs
...
use platformdirs
2023-02-10 00:09:44 +01:00
TW
16f4bf5d7b
Merge pull request #7328 from ThomasWaldmann/hashindex-compact
...
hashindex minor fixes, tweaks, tests
2023-02-09 22:46:48 +01:00
Thomas Waldmann
3d57dc0590
hashindex: add tests, misc. minor fixes/changes
...
test hashtable expansion/rebuild.
hashindex_lookup:
- return -2 for a compact / completely full hashtable
- return -1 and (via start_idx pointer) the deleted/tombstone bucket index.
fix size assertion (we add 1 element to trigger rebuild)
fix upper_limit check - since we'll be adding 1 to num_entries below,
the condition should be >=:
hashindex_compact: set min_empty/upper_limit
Co-authored-by: Dan Christensen <jdc+github@uwo.ca>
2023-02-09 22:14:07 +01:00
Thomas Waldmann
1ed8ac0408
hashindex_pytest: move hashtable create into separate function
2023-02-09 21:58:40 +01:00
Thomas Waldmann
e556233e30
hashindex_pytest: add a comment
2023-02-09 21:58:37 +01:00
Thomas Waldmann
4c2af9fb96
renamed hashindex_stress -> hashindex_pytest
2023-02-09 21:58:23 +01:00
TW
79d6835738
Merge pull request #7331 from ThomasWaldmann/undefine-ndebug-master
...
undef NDEBUG for chunker and hashindex
2023-02-09 21:52:20 +01:00
Thomas Waldmann
311ac55ebd
undef NDEBUG for chunker and hashindex
...
note:
intentionally not undef'ing it for all the cython-only generated C code.
2023-02-09 21:01:03 +01:00
TW
2b2586a098
Merge pull request #7330 from ThomasWaldmann/update-codecov
...
upgrade codecov-action to v3
2023-02-09 20:37:27 +01:00
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