]> git.ipfire.org Git - thirdparty/ccache.git/log
thirdparty/ccache.git
3 years agofeat(http-storage): Make HTTP keep-alive configurable 934/head
Gregor Jasny [Fri, 1 Oct 2021 06:54:38 +0000 (08:54 +0200)] 
feat(http-storage): Make HTTP keep-alive configurable

3 years agofix(http-storage): Disable broken connection keep-alive
Gregor Jasny [Sun, 5 Sep 2021 17:55:27 +0000 (19:55 +0200)] 
fix(http-storage): Disable broken connection keep-alive

After ignoring SIGPIPE (b2a88e7) keep-alive support has been
re-enabled for HTTP Storage. Unfortunately it's still broken
but does not crash ccache, anymore.

This is the tcpdump of a (cache miss) compilation that takes longer
than the server keep-alive timeout:

```
10:51:17.214678 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [S], seq 1018344313, win 62727, options [mss 8961,sackOK,TS val 1638189791 ecr 0,nop,wscale 7], length 0
10:51:17.216386 IP 10.34.132.45.webcache > 10.34.129.62.37468: Flags [S.], seq 2695216843, ack 1018344314, win 26847, options [mss 8645,sackOK,TS val 1598789083 ecr 1638189791,nop,wscale 9], length 0
10:51:17.216424 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [.], ack 1, win 491, options [nop,nop,TS val 1638189793 ecr 1598789083], length 0
10:51:17.216534 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [P.], seq 1:143, ack 1, win 491, options [nop,nop,TS val 1638189793 ecr 1598789083], length 142: HTTP: GET /cache/ff87vlgke3poou7uq1ma2m3hh000gckmq HTTP/1.1
10:51:17.217393 IP 10.34.132.45.webcache > 10.34.129.62.37468: Flags [.], ack 143, win 55, options [nop,nop,TS val 1598789084 ecr 1638189793], length 0
10:51:17.217433 IP 10.34.132.45.webcache > 10.34.129.62.37468: Flags [P.], seq 1:309, ack 143, win 55, options [nop,nop,TS val 1598789085 ecr 1638189793], length 308: HTTP: HTTP/1.1 404 Not Found
10:51:17.217456 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [.], ack 309, win 489, options [nop,nop,TS val 1638189794 ecr 1598789085], length 0
10:51:17.538819 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [P.], seq 143:285, ack 309, win 489, options [nop,nop,TS val 1638190115 ecr 1598789085], length 142: HTTP: GET /cache/135di89r02vv5fgopbtsopfjllo01b8lg HTTP/1.1
10:51:17.539838 IP 10.34.132.45.webcache > 10.34.129.62.37468: Flags [P.], seq 309:617, ack 285, win 57, options [nop,nop,TS val 1598789407 ecr 1638190115], length 308: HTTP: HTTP/1.1 404 Not Found
10:51:17.539876 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [.], ack 617, win 487, options [nop,nop,TS val 1638190117 ecr 1598789407], length 0

10:52:32.536322 IP 10.34.132.45.webcache > 10.34.129.62.37468: Flags [F.], seq 617, ack 285, win 57, options [nop,nop,TS val 1598864404 ecr 1638190117], length 0
10:52:32.577893 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [.], ack 618, win 487, options [nop,nop,TS val 1638265155 ecr 1598864404], length 0

10:52:42.173135 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [P.], seq 285:492, ack 618, win 487, options [nop,nop,TS val 1638274750 ecr 1598864404], length 207: HTTP: PUT /cache/135di89r02vv5fgopbtsopfjllo01b8lg HTTP/1.1
10:52:42.173153 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [.], seq 492:9125, ack 618, win 487, options [nop,nop,TS val 1638274750 ecr 1598864404], length 8633: HTTP
10:52:42.173159 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [P.], seq 9125:17758, ack 618, win 487, options [nop,nop,TS val 1638274750 ecr 1598864404], length 8633: HTTP
10:52:42.173165 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [.], seq 17758:26391, ack 618, win 487, options [nop,nop,TS val 1638274750 ecr 1598864404], length 8633: HTTP
10:52:42.174049 IP 10.34.132.45.webcache > 10.34.129.62.37468: Flags [R], seq 2695217461, win 0, length 0
10:52:42.174056 IP 10.34.132.45.webcache > 10.34.129.62.37468: Flags [R], seq 2695217461, win 0, length 0
10:52:42.174057 IP 10.34.132.45.webcache > 10.34.129.62.37468: Flags [R], seq 2695217461, win 0, length 0
```

The PUT error due to the closed socket is also logged:
```
[2021-09-14T10:52:42.068112 2089 ] Storing result file modules/asyncly/Test/Unit/CMakeFiles/test_asyncly.dir/future/FutureTest.cpp.o
[2021-09-14T10:52:42.068118 2089 ] Storing embedded file #0 .o (36847216 bytes) from modules/asyncly/Test/Unit/CMakeFiles/test_asyncly.dir/future/FutureTest.cpp.o
[2021-09-14T10:52:42.154930 2089 ] Storing result file modules/asyncly/Test/Unit/CMakeFiles/test_asyncly.dir/future/FutureTest.cpp.o.d
[2021-09-14T10:52:42.154951 2089 ] Storing embedded file #1 .d (122626 bytes) from modules/asyncly/Test/Unit/CMakeFiles/test_asyncly.dir/future/FutureTest.cpp.o.d
[2021-09-14T10:52:42.155260 2089 ] Stored 135di89r02vv5fgopbtsopfjllo01b8lg in primary storage (/cache/ccache/1/3/5di89r02vv5fgopbtsopfjllo01b8lgR)
[2021-09-14T10:52:42.175445 2089 ] Failed to put /cache/135di89r02vv5fgopbtsopfjllo01b8lg to http storage: Unknown (1)
[2021-09-14T10:52:42.175999 2089 ] Adding result key to /cache/ccache/f/f/87vlgke3poou7uq1ma2m3hh000gckmqM
[2021-09-14T10:52:42.179375 2089 ] Using default compression level 1
[2021-09-14T10:52:42.180306 2089 ] Stored ff87vlgke3poou7uq1ma2m3hh000gckmq in primary storage (/cache/ccache/f/f/87vlgke3poou7uq1ma2m3hh000gckmqM)
[2021-09-14T10:52:42.180341 2089 ] Not putting in http://jenkins3-bazelcache.ec2.getgotools.net:8080/cache since it failed earlier
```

I believe a 90s compilation is worth caching and more important than
skipping the TCP three-way handshake.

3 years agodocs: Remove stray heading in NEWS
Joel Rosdahl [Tue, 28 Sep 2021 19:47:22 +0000 (21:47 +0200)] 
docs: Remove stray heading in NEWS

3 years agochore: Update authors v4.4.2
Joel Rosdahl [Tue, 28 Sep 2021 19:36:30 +0000 (21:36 +0200)] 
chore: Update authors

3 years agoUpdate NEWS
Joel Rosdahl [Tue, 28 Sep 2021 19:36:16 +0000 (21:36 +0200)] 
Update NEWS

3 years agofix: Don’t update manifest on preprocessed hit with disabled direct mode
Joel Rosdahl [Tue, 28 Sep 2021 18:36:17 +0000 (20:36 +0200)] 
fix: Don’t update manifest on preprocessed hit with disabled direct mode

After c7c0837a23fe9dc79613bf3dd4ddd8d91c58d541, update_manifest_file can
be called erroneously if the direct mode is disabled when there has been
a preprocessed hit.

Fix this by asserting that update_manifest_file is only called when
direct mode is enabled, fixing the call site and adding the test case
that should already have existed.

Fixes #935.

3 years agoci: Pin macOS to 10.15
Joel Rosdahl [Mon, 27 Sep 2021 19:08:56 +0000 (21:08 +0200)] 
ci: Pin macOS to 10.15

macOS-latest now means macOS-11.

3 years agorefactor: Pass const Context to process_arg
Joel Rosdahl [Sun, 26 Sep 2021 19:56:14 +0000 (21:56 +0200)] 
refactor: Pass const Context to process_arg

This narrows down what process_arg is allowed to do.

3 years agorefactor: Move included_pch_file from Context to ArgsInfo
Joel Rosdahl [Sun, 26 Sep 2021 19:54:03 +0000 (21:54 +0200)] 
refactor: Move included_pch_file from Context to ArgsInfo

3 years agoenhance: Add util::replace_all function
Joel Rosdahl [Wed, 22 Sep 2021 19:58:47 +0000 (21:58 +0200)] 
enhance: Add util::replace_all function

3 years agotest: Cope with CC being a wrapper script that uses ccache
Joel Rosdahl [Mon, 20 Sep 2021 05:38:27 +0000 (07:38 +0200)] 
test: Cope with CC being a wrapper script that uses ccache

Fixes #914.

3 years agotest: Silence stray output
Joel Rosdahl [Mon, 20 Sep 2021 05:36:51 +0000 (07:36 +0200)] 
test: Silence stray output

3 years agotest: Use shell builtin pwd for basedir test (#933)
Kira Bruneau [Mon, 13 Sep 2021 17:05:44 +0000 (13:05 -0400)] 
test: Use shell builtin pwd for basedir test (#933)

3 years agochore: Update news v4.4.1
Joel Rosdahl [Sat, 11 Sep 2021 07:00:33 +0000 (09:00 +0200)] 
chore: Update news

3 years agofeat: Show separate statistics counters for misses
Joel Rosdahl [Sat, 11 Sep 2021 06:51:33 +0000 (08:51 +0200)] 
feat: Show separate statistics counters for misses

3 years agofix(http-storage): Enable keep-alive again after fixing SIGPIPE issue
Joel Rosdahl [Thu, 9 Sep 2021 19:35:46 +0000 (21:35 +0200)] 
fix(http-storage): Enable keep-alive again after fixing SIGPIPE issue

See #931.

3 years agofix(redis-storage): Ignore SIGPIPE
Joel Rosdahl [Thu, 9 Sep 2021 18:55:53 +0000 (20:55 +0200)] 
fix(redis-storage): Ignore SIGPIPE

libhiredis doesn’t pass MSG_NOSIGNAL to send to ccache can die from
SIGPIPE. Disable SIGPIPE so that the socket code receives EPIPE
correctly.

This should also fix a similar problem with the HTTP storage backend.

Fixes #931.

3 years agobump: Upgrade to cpp-httplib 0.9.4
Joel Rosdahl [Fri, 3 Sep 2021 06:21:52 +0000 (08:21 +0200)] 
bump: Upgrade to cpp-httplib 0.9.4

3 years agorefactor: Improve compatibility definition of DLLIMPORT
Joel Rosdahl [Sun, 29 Aug 2021 19:36:28 +0000 (21:36 +0200)] 
refactor: Improve compatibility definition of DLLIMPORT

3 years agofix: Always store configuration origin value (#928)
Gregor Jasny [Tue, 7 Sep 2021 17:22:51 +0000 (19:22 +0200)] 
fix: Always store configuration origin value (#928)

3 years agofix(http-storage): Disable broken connection keep-alive (#927)
Gregor Jasny [Sun, 5 Sep 2021 17:55:27 +0000 (19:55 +0200)] 
fix(http-storage): Disable broken connection keep-alive (#927)

3 years agoFix build errors with clang on Windows (#924)
Orgad Shaneh [Wed, 1 Sep 2021 17:40:02 +0000 (20:40 +0300)] 
Fix build errors with clang on Windows (#924)

3 years agoMerge pull request #918 from gjasny/ipo
Joel Rosdahl [Sun, 29 Aug 2021 18:52:50 +0000 (20:52 +0200)] 
Merge pull request #918 from gjasny/ipo

3 years agofeat(cmake): Disable IPO for mingw 918/head
Gregor Jasny [Sun, 22 Aug 2021 11:09:47 +0000 (13:09 +0200)] 
feat(cmake): Disable IPO for mingw

On mingw IPO seems to be broken (out-of-diskspace errors
and lacking linker module support), therefore IPO support is being
deactivated.

3 years agofeat(cmake): Use standard linker for LTO scenarios
Gregor Jasny [Sun, 22 Aug 2021 10:49:09 +0000 (12:49 +0200)] 
feat(cmake): Use standard linker for LTO scenarios

3 years agofeat(cmake): Use the matching lld for clang
Gregor Jasny [Sun, 22 Aug 2021 10:47:04 +0000 (12:47 +0200)] 
feat(cmake): Use the matching lld for clang

Otherwise one could end up on Ubuntu with clang-11 calling lld-10
which breaks IPO.

3 years agofix(test): Pass all three required arguments to expect_file_count (#925)
Gregor Jasny [Sun, 29 Aug 2021 17:50:22 +0000 (19:50 +0200)] 
fix(test): Pass all three required arguments to expect_file_count (#925)

3 years agofix(test): Fix basedir suite failure with symlinked PWD
Joel Rosdahl [Tue, 24 Aug 2021 17:43:30 +0000 (19:43 +0200)] 
fix(test): Fix basedir suite failure with symlinked PWD

Fixes #916.

3 years agotest: Improve output of differing text files on failure
Joel Rosdahl [Tue, 24 Aug 2021 17:40:35 +0000 (19:40 +0200)] 
test: Improve output of differing text files on failure

3 years agochore: Remove asciidoctor package from CentOS 8 Dockerfile
Joel Rosdahl [Tue, 24 Aug 2021 16:58:43 +0000 (18:58 +0200)] 
chore: Remove asciidoctor package from CentOS 8 Dockerfile

Asciidoctor is apparently not packaged for CentOS 8.

3 years agochore: Sort LICENSE.adoc entries properly
Joel Rosdahl [Fri, 20 Aug 2021 19:02:25 +0000 (21:02 +0200)] 
chore: Sort LICENSE.adoc entries properly

3 years agofeat: Only show secondary storage stats if non-empty or with -vv
Joel Rosdahl [Fri, 20 Aug 2021 18:12:29 +0000 (20:12 +0200)] 
feat: Only show secondary storage stats if non-empty or with -vv

3 years agofix(test): Fix .incbin test with newer binutils
Joel Rosdahl [Fri, 20 Aug 2021 17:56:17 +0000 (19:56 +0200)] 
fix(test): Fix .incbin test with newer binutils

The assembler in binutils 2.37 doesn’t want to include /dev/null with
a .incbin directive:

    /tmp/ccbGWiew.s: Assembler messages:
    /tmp/ccbGWiew.s:4: Error: unable to include `/dev/null'
    incbin.s: Assembler messages:
    incbin.s:1: Error: unable to include `/dev/null'

3 years agodocs: Fix grammar
Joel Rosdahl [Thu, 19 Aug 2021 19:52:44 +0000 (21:52 +0200)] 
docs: Fix grammar

3 years agochore: Update release date v4.4
Joel Rosdahl [Thu, 19 Aug 2021 18:43:30 +0000 (20:43 +0200)] 
chore: Update release date

3 years agobuild: Improve detection av Ccache version from source repo
Joel Rosdahl [Thu, 19 Aug 2021 18:34:43 +0000 (20:34 +0200)] 
build: Improve detection av Ccache version from source repo

When running CMake outside the source repository a plain git command
naturally won’t find the repository. Fix this by pointing git towards
the repository.

3 years agochore: Fix Cppcheck warnings
Joel Rosdahl [Thu, 19 Aug 2021 17:57:13 +0000 (19:57 +0200)] 
chore: Fix Cppcheck warnings

3 years agodocs: Improve contributor notes in NEWS
Joel Rosdahl [Wed, 18 Aug 2021 19:43:35 +0000 (21:43 +0200)] 
docs: Improve contributor notes in NEWS

3 years agochore: Update authors
Joel Rosdahl [Wed, 18 Aug 2021 18:11:34 +0000 (20:11 +0200)] 
chore: Update authors

3 years agodocs: Update NEWS for ccache 4.4
Joel Rosdahl [Tue, 17 Aug 2021 18:04:24 +0000 (20:04 +0200)] 
docs: Update NEWS for ccache 4.4

3 years agochore: Add Ryan Burns to .mailmap
Joel Rosdahl [Tue, 17 Aug 2021 18:03:57 +0000 (20:03 +0200)] 
chore: Add Ryan Burns to .mailmap

3 years agochore: Use official debian:11 Docker tag
Joel Rosdahl [Tue, 17 Aug 2021 16:52:21 +0000 (18:52 +0200)] 
chore: Use official debian:11 Docker tag

3 years agodocs: Use consistent casing of “Ccache” in NEWS
Joel Rosdahl [Tue, 17 Aug 2021 16:34:36 +0000 (18:34 +0200)] 
docs: Use consistent casing of “Ccache” in NEWS

3 years agofeat(tracing): Add more trace points
Joel Rosdahl [Mon, 16 Aug 2021 19:17:16 +0000 (21:17 +0200)] 
feat(tracing): Add more trace points

3 years agofix(tracing): Always call MTR_END for each MTR_BEGIN
Joel Rosdahl [Mon, 16 Aug 2021 19:16:18 +0000 (21:16 +0200)] 
fix(tracing): Always call MTR_END for each MTR_BEGIN

3 years agorefactor(tracing): Use MTR_SCOPE
Joel Rosdahl [Mon, 16 Aug 2021 19:15:56 +0000 (21:15 +0200)] 
refactor(tracing): Use MTR_SCOPE

3 years agobump: Upgrade minitrace to latest master
Joel Rosdahl [Mon, 16 Aug 2021 19:05:30 +0000 (21:05 +0200)] 
bump: Upgrade minitrace to latest master

3 years agofeat: Improve statistics summary
Joel Rosdahl [Mon, 16 Aug 2021 06:10:21 +0000 (08:10 +0200)] 
feat: Improve statistics summary

The number of statistics counters has become very large, making the
output “ccache -s” hard to overview.

Improvements:

- The -s/--show-stats option now prints a more condensed overview where
  the counters representing “uncacheable calls” are summed as
  “uncacheable” and “errors” counters. Note: Scripts should use
  --print-stats instead of trying to parse the output of --show-stats.
- Added hit rate for direct/preprocessed hits/misses as well.
- Added a new -v/--verbose option, which makes --show-stats and
  --show-log-stats show more details.

3 years agostyle: Use uppercase literal suffixes
Joel Rosdahl [Sun, 15 Aug 2021 20:06:29 +0000 (22:06 +0200)] 
style: Use uppercase literal suffixes

3 years agofeat: Print statistics IDs instead of descriptions to debug log
Joel Rosdahl [Sun, 15 Aug 2021 19:41:03 +0000 (21:41 +0200)] 
feat: Print statistics IDs instead of descriptions to debug log

This is in preparation for future statistics counters that won’t have
human-readable descriptions. (The statistics IDs are human-readable
enough.)

3 years agorefactor: Return from process_main_options instead of exiting
Joel Rosdahl [Sun, 15 Aug 2021 19:29:40 +0000 (21:29 +0200)] 
refactor: Return from process_main_options instead of exiting

3 years agofix: Don’t print “unrecognized option” twice
Joel Rosdahl [Sun, 15 Aug 2021 19:27:36 +0000 (21:27 +0200)] 
fix: Don’t print “unrecognized option” twice

Fixes an issue introduced in 513c83faaafc3a9848cb4492961104e4f4768247.

3 years agoenhance: Let TextTable::add_row take a vector
Joel Rosdahl [Sun, 15 Aug 2021 18:45:59 +0000 (20:45 +0200)] 
enhance: Let TextTable::add_row take a vector

3 years agoenhance: Add TextTable support for cells spanning several columns
Joel Rosdahl [Sat, 14 Aug 2021 19:44:51 +0000 (21:44 +0200)] 
enhance: Add TextTable support for cells spanning several columns

3 years agorefactor: Simplify TextTable usage
Joel Rosdahl [Wed, 11 Aug 2021 10:38:45 +0000 (12:38 +0200)] 
refactor: Simplify TextTable usage

3 years agoenhance: Add util::TextTable::TextTable(const char*)
Joel Rosdahl [Wed, 11 Aug 2021 10:36:46 +0000 (12:36 +0200)] 
enhance: Add util::TextTable::TextTable(const char*)

3 years agoenhance: Add TextTable support for right-aligned integers
Joel Rosdahl [Wed, 11 Aug 2021 10:29:22 +0000 (12:29 +0200)] 
enhance: Add TextTable support for right-aligned integers

3 years agobuild: Link ws2_32 to third_party instead of ccache_framework (#913)
R. Voggenauer [Sun, 15 Aug 2021 18:32:27 +0000 (20:32 +0200)] 
build: Link ws2_32 to third_party instead of ccache_framework (#913)

3 years agofix(test): Fix typos in trim_dir suite
Joel Rosdahl [Tue, 10 Aug 2021 18:35:11 +0000 (20:35 +0200)] 
fix(test): Fix typos in trim_dir suite

3 years agofeat: Support subsecond mtime/atime for --cleanup and --trim-dir
Joel Rosdahl [Tue, 10 Aug 2021 18:32:43 +0000 (20:32 +0200)] 
feat: Support subsecond mtime/atime for --cleanup and --trim-dir

3 years agoenhance: Detect support for st_atim field in struct stat
Joel Rosdahl [Tue, 10 Aug 2021 18:30:19 +0000 (20:30 +0200)] 
enhance: Detect support for st_atim field in struct stat

3 years agofeat: Rename --directory option to --dir
Joel Rosdahl [Tue, 10 Aug 2021 18:04:39 +0000 (20:04 +0200)] 
feat: Rename --directory option to --dir

Other options use abbreviated forms (e.g. “config” and “max”), so this
makes things more consistent.

3 years agofeat: Add --trim-dir option for usage with secondary storage directories
Joel Rosdahl [Tue, 10 Aug 2021 15:44:30 +0000 (17:44 +0200)] 
feat: Add --trim-dir option for usage with secondary storage directories

3 years agofeat: Make --config-path and --directory affect whole command line
Joel Rosdahl [Tue, 10 Aug 2021 13:32:07 +0000 (15:32 +0200)] 
feat: Make --config-path and --directory affect whole command line

Command line options are processed strictly in order, which means that

    ccache -d dir -s

is not the same as

    ccache -s -d dir

which is not very intuitive. There are also planned features where is
doesn’t make sense to have to put “non-command options” before the
“command options”.

Improve this by processing command line options in two passes: first
non-command options and then command options (still in order).

3 years agorefactor: Move static getopt data to global level
Joel Rosdahl [Tue, 10 Aug 2021 13:21:34 +0000 (15:21 +0200)] 
refactor: Move static getopt data to global level

3 years agodoc: Describe interaction between primary and secondary storage
Joel Rosdahl [Mon, 9 Aug 2021 19:40:38 +0000 (21:40 +0200)] 
doc: Describe interaction between primary and secondary storage

3 years agofeat: Add share-hits attribute for secondary storage
Joel Rosdahl [Mon, 9 Aug 2021 19:18:58 +0000 (21:18 +0200)] 
feat: Add share-hits attribute for secondary storage

With share-hits=false, a secondary storage backend will not share hits
to primary storage.

3 years agofeat: Add reshare config option
Joel Rosdahl [Mon, 9 Aug 2021 18:55:11 +0000 (20:55 +0200)] 
feat: Add reshare config option

Setting reshare (CCACHE_RESHARE) to true make ccache send results to
secondary storage even for primary storage cache hits. The default is
false.

3 years agofeat: Add statistics for forced recaches
Joel Rosdahl [Sun, 8 Aug 2021 16:49:01 +0000 (18:49 +0200)] 
feat: Add statistics for forced recaches

3 years agofeat: Add statistics for primary/secondary hits/miss
Joel Rosdahl [Sun, 8 Aug 2021 17:59:58 +0000 (19:59 +0200)] 
feat: Add statistics for primary/secondary hits/miss

3 years agofeat: Add statistics for direct/preprocessed cache miss
Joel Rosdahl [Sun, 8 Aug 2021 15:35:18 +0000 (17:35 +0200)] 
feat: Add statistics for direct/preprocessed cache miss

3 years agotest: Use machine-parsable statistics IDs in tests
Joel Rosdahl [Sun, 8 Aug 2021 17:28:34 +0000 (19:28 +0200)] 
test: Use machine-parsable statistics IDs in tests

3 years agorefactor(test): Improve duplicate tests in base suite
Joel Rosdahl [Sun, 8 Aug 2021 17:13:16 +0000 (19:13 +0200)] 
refactor(test): Improve duplicate tests in base suite

3 years agofeat: Sort output of --print-stats
Joel Rosdahl [Sun, 8 Aug 2021 17:00:22 +0000 (19:00 +0200)] 
feat: Sort output of --print-stats

3 years agoenhance: Prepare for a ccache invocation having multiple results
Joel Rosdahl [Sun, 8 Aug 2021 19:44:44 +0000 (21:44 +0200)] 
enhance: Prepare for a ccache invocation having multiple results

That is, “result” as in “increased statistics counter”.

4 years agofix: Remove obsolete statistics counter and comment when disabled
Joel Rosdahl [Sun, 8 Aug 2021 12:41:43 +0000 (14:41 +0200)] 
fix: Remove obsolete statistics counter and comment when disabled

4 years agorefactor: Improve handling of statistics updates and expected events
Joel Rosdahl [Sun, 8 Aug 2021 08:40:58 +0000 (10:40 +0200)] 
refactor: Improve handling of statistics updates and expected events

Ccache uses exceptions for both truly exceptional events (such as I/O
error) and non-exceptional events (such as unsupported compiler
arguments). Regardless of the nature of the event, at most one
statistics counter can be incremented.

Improve this by:

- Using nonstd::expected instead of exceptions internally in the main
  code flow. This makes the code easier to reason about.
- Adding support for communicating several statistics counter updates
  both for success and failure code paths. This is in preparation for
  future improvements of statistics related to secondary storage.

4 years agochore: Fix example in dockerfiles/README
Joel Rosdahl [Sun, 8 Aug 2021 06:40:56 +0000 (08:40 +0200)] 
chore: Fix example in dockerfiles/README

4 years agodocs: Use non-legacy markup for block IDs
Joel Rosdahl [Sat, 7 Aug 2021 14:06:55 +0000 (16:06 +0200)] 
docs: Use non-legacy markup for block IDs

4 years agofeat(file-storage): Add support for flat layout
Joel Rosdahl [Sat, 7 Aug 2021 13:43:24 +0000 (15:43 +0200)] 
feat(file-storage): Add support for flat layout

4 years agofeat(http-storage): Add support for subdirs layout, making it default
Joel Rosdahl [Sat, 7 Aug 2021 12:44:21 +0000 (14:44 +0200)] 
feat(http-storage): Add support for subdirs layout, making it default

4 years agoenhance(test): Let http-server create subdirectories as needed
Joel Rosdahl [Sat, 7 Aug 2021 12:42:32 +0000 (14:42 +0200)] 
enhance(test): Let http-server create subdirectories as needed

4 years agofix(test): Remove debug printout and move Bazel layout test
Joel Rosdahl [Sat, 7 Aug 2021 12:42:00 +0000 (14:42 +0200)] 
fix(test): Remove debug printout and move Bazel layout test

4 years agofix: Don’t read let Context read user configuration in unit tests
Joel Rosdahl [Sat, 7 Aug 2021 11:12:56 +0000 (13:12 +0200)] 
fix: Don’t read let Context read user configuration in unit tests

accd21e4 inadvertently made unit tests populate Context::config from the
environment and the user configuration. Fix this by moving code for
reading config, setting of logging, etc. into a separate method only to
be called by non-test code.

As noted by Michael Kruse in #815.

4 years agofeat(storage): Add support for cache sharding on secondary storage (#912)
Joel Rosdahl [Sat, 7 Aug 2021 07:00:17 +0000 (09:00 +0200)] 
feat(storage): Add support for cache sharding on secondary storage (#912)

This adds support for a shards attribute with a comma-separated list of
names for sharding (partitioning) the cache entries using Rendezvous
hashing, typically to spread the cache over a server cluster. When set,
the storage URL must contain an asterisk (*), which will be replaced by
one of the shard names to form a real URL. A shard name can optionally
have an appended weight within parentheses to indicate how much of the
key space should be associated with that shard. A shard with weight w
will contain w/S of the cache, where S is the sum of all shard weights.
A weight could for instance be set to represent the available memory for
a memory cache on a specific server. The default weight is 1.

For example,

    redis://cache-*.example.com|shards=a(3),b(1),c(1.5)

will put 55% (3/5.5) of the cache on redis://cache-a.example.com, 18%
(1/5.5) on redis://cache-b.example.com and 27% (1.5/5.5) on
redis://cache-c.example.com.

4 years agochore: Sort LICENSE.adoc entries
Joel Rosdahl [Thu, 5 Aug 2021 18:37:18 +0000 (20:37 +0200)] 
chore: Sort LICENSE.adoc entries

4 years agochore: Improve AsciiDoc markup of LICENSE.adoc
Joel Rosdahl [Thu, 5 Aug 2021 18:34:58 +0000 (20:34 +0200)] 
chore: Improve AsciiDoc markup of LICENSE.adoc

4 years agoci: Use latest codespell
Joel Rosdahl [Thu, 5 Aug 2021 18:27:33 +0000 (20:27 +0200)] 
ci: Use latest codespell

4 years agochore: Fix typos
Joel Rosdahl [Thu, 5 Aug 2021 18:22:04 +0000 (20:22 +0200)] 
chore: Fix typos

4 years agorefactor: Split httplib into .h and .cpp parts
Joel Rosdahl [Thu, 5 Aug 2021 18:15:59 +0000 (20:15 +0200)] 
refactor: Split httplib into .h and .cpp parts

This improves recompilation speed of
src/storage/secondary/HttpStorage.cpp.

4 years agofix(file-storage): Create CACHEDIR.TAG after subdir
Joel Rosdahl [Wed, 4 Aug 2021 19:51:33 +0000 (21:51 +0200)] 
fix(file-storage): Create CACHEDIR.TAG after subdir

Otherwise creation will fail the first time with an ugly log message.

4 years agorefactor: Use util::parse_double
Joel Rosdahl [Wed, 4 Aug 2021 19:42:08 +0000 (21:42 +0200)] 
refactor: Use util::parse_double

4 years agoenhance(util): Add parse_double function
Joel Rosdahl [Wed, 4 Aug 2021 19:39:08 +0000 (21:39 +0200)] 
enhance(util): Add parse_double function

4 years agochore: Fix typo in comment
Joel Rosdahl [Wed, 4 Aug 2021 19:27:29 +0000 (21:27 +0200)] 
chore: Fix typo in comment

4 years agoenhance(util): Add replace_first function
Joel Rosdahl [Wed, 4 Aug 2021 17:45:22 +0000 (19:45 +0200)] 
enhance(util): Add replace_first function

4 years agodocs: Use italics consistently for references to sections
Joel Rosdahl [Tue, 3 Aug 2021 07:07:48 +0000 (09:07 +0200)] 
docs: Use italics consistently for references to sections

4 years agofeat(storage): Log time taken for secondary storage operations
Joel Rosdahl [Fri, 30 Jul 2021 12:04:36 +0000 (14:04 +0200)] 
feat(storage): Log time taken for secondary storage operations

4 years agofeat(http-storage): Log translation to pseudo-SHA256 key
Joel Rosdahl [Fri, 30 Jul 2021 08:29:24 +0000 (10:29 +0200)] 
feat(http-storage): Log translation to pseudo-SHA256 key

4 years agodocs: Add scheme to link to fonts.googleapis.com (#910)
Orgad Shaneh [Mon, 2 Aug 2021 18:59:30 +0000 (21:59 +0300)] 
docs: Add scheme to link to fonts.googleapis.com (#910)

This makes it possible to view generated HTML files locally using the file scheme.

4 years agodocs: Reflow some paragraphs after #911
Joel Rosdahl [Mon, 2 Aug 2021 18:51:59 +0000 (20:51 +0200)] 
docs: Reflow some paragraphs after #911