Commit Graph

24 Commits

Author SHA1 Message Date
Thomas Waldmann b92f4aa487
remove --consider-part-files, related stats code, update docs
we now just treat that one .borg_part file we might have inside
checkpoint archives as a normal file.

people can recognize via the file name it is a partial file.

nobody cares for statistics of checkpoint files and the final
archive now does not contain any partial files any more, thus
no needs to maintain statistics about count and size of part
files.
2023-02-01 13:04:18 +01:00
Thomas Waldmann 449b02742f make setuptools happy, fixes #6874 (try 2, same as in 1.2-maint)
work around setuptools puking about:

          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'borg.cache_sync' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.

          'borg.cache_sync' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).

          Please make sure that 'borg.cache_sync' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
2022-08-04 17:18:23 +02:00
Thomas Waldmann 0e0b33b5ff cache_sync directory: add a dummy __init__.py to get rid of setuptools warning 2022-08-04 11:55:03 +02:00
Thomas Waldmann a7d4dd2ba6 unpack.h: fix compiler warnings, improve error handling 2022-08-04 11:20:23 +02:00
Thomas Waldmann 2c1f7951c4 remove csize from ChunkIndexEntry 2022-06-12 17:15:13 +02:00
Thomas Waldmann ace5957524 remove csize from item.chunks elements 2022-06-12 15:48:33 +02:00
Thomas Waldmann f8dbe5b542 cleanup msgpack related str/bytes mess, see #968
see ticket and borg.helpers.msgpack docstring.
2022-06-09 17:57:28 +02:00
James Buren 596e33b68d properly suppress -Wimplicit-fallthrough
It turns out that explaining the comment actually breaks its
intended usage.
2022-03-09 05:00:56 -06:00
James Buren 4a55d9de3c suppress -Wimplicit-fallthrough warning
These instances of implicit switch case fallthrough appear to be
intentional. Add comments that the compiler understands to suppress
the false positive warning.
2022-02-27 14:29:53 -06:00
James Buren 5c94c932bb src/borg/cache_sync/unpack.h: fix compiler warnings
The key argument being sent to hashindex_get and hashindex_set by
multiple functions is a different signedness from what the functions
expect. This resolves the issue by changing the key type in the
unpack_user struct to unsigned char.
2022-02-26 14:02:29 -06:00
Robin Schneider fb38ba579f
Use HTTPS everywhere (mechanical edit using util from https-everywhere)
Ref: https://github.com/EFForg/https-everywhere/tree/master/utils/rewriter

```Shell
~/src/EFForg/https-everywhere/utils/rewriter/rewriter.js .
```

A few changes were reset/fixed manually before the commit.
2020-12-22 16:36:40 +01:00
TW c3f40de606
cache_sync: compute size/count stats, borg info: consider part files (#4286)
cache_sync: compute size/count stats, borg info: consider part files

fixes #3522
2019-02-04 03:26:45 +01:00
Emmo Emminghaus f8ef6af454 hashindex: clean void* arithmetic up #2677
lowlevel: clean void* arithmetic up
unpack: repalce nonstandard false with 0
2018-10-24 21:40:05 +02:00
Marian Beermann e189a4d302 info: use CacheSynchronizer & HashIndex.stats_against 2017-06-13 14:34:10 +02:00
Marian Beermann 4490a8bbc3 cache sync: don't do memcpy(..., 0, 0)
!ctx->buf => ctx->tail - ctx->head == 0
2017-06-13 11:16:04 +02:00
Marian Beermann 78cbf695c4 cache sync: suppress GCC C90/C99 int literal warning
warning: this decimal constant is unsigned only in ISO C90

Raised by GCC 4.9.2 on PowerPC.

The warning is bogus here due to the immediate explicit cast; newer
versions don't emit it.
2017-06-12 10:53:55 +02:00
Marian Beermann 3c6372f841 cache sync: convert incoming integers to uint64_t 2017-06-11 20:20:00 +02:00
Marian Beermann 49ca3dca33 cache sync: move assert() behind declarations 2017-06-11 11:42:39 +02:00
Marian Beermann 0e31f78dd6 cache sync: avoid "l" and such as a variable name, note vanilla changes 2017-06-10 10:17:28 +02:00
Marian Beermann 5eb43b8464 cache sync: give overview of the source's structure 2017-06-10 10:17:28 +02:00
Marian Beermann 5af66dbb12 cache sync: add more refcount tests 2017-06-03 15:02:27 +02:00
Marian Beermann 5b3667b617 cache sync: macros in all-caps 2017-06-02 19:31:56 +02:00
Marian Beermann 795cdfc9ab cache sync: move stat initialization to main unpack 2017-06-02 19:30:53 +02:00
Marian Beermann c786a5941e CacheSynchronizer: redo as quasi FSM on top of unpack.h
This is a (relatively) simple state machine running in the
data callbacks invoked by the msgpack unpacking stack machine
(the same machine is used in msgpack-c and msgpack-python,
changes are minor and cosmetic, e.g. removal of msgpack_unpack_object,
removal of the C++ template thus porting to C and so on).

Compared to the previous solution this has multiple advantages
- msgpack-c dependency is removed
- this approach is faster and requires fewer and smaller
  memory allocations

Testability of the two solutions does not differ in my
professional opinion(tm).

Two other changes were rolled up; _hashindex.c can be compiled
without Python.h again (handy for fuzzing and testing);
a "small" bug in the cache sync was fixed which allocated too
large archive indices, leading to excessive archive.chunks.d
disk usage (that actually gave me an idea).
2017-06-02 17:43:15 +02:00