kubernetes/vendor
Nic Cope 7a2c6a432f Use checksums instead of fsyncs to manage discovery cache corruption
Part of the API discovery cache uses an HTTP RoundTripper that
transparently caches responses to disk. The upstream implementation of
the disk cache is hard coded to call Sync() on every file it writes.
This has noticably poor performance on modern Macs, which ask their disk
controllers to flush all the way to persistant storage because Go uses
the `F_FULLFSYNC` fnctl. Apple recommends minimizing this behaviour in
order to avoid degrading performance and increasing disk wear.

The content of the discovery cache is not critical; it is indeed just a
cache and can be recreated by hitting the API servers' discovery
endpoints. This commit replaces upstream httpcache's diskcache
implementation with a similar implementation that can use CRC-32
checksums to detect corrupted cache entries at read-time. When such an
entry is detected (e.g. because it was only partially flushed to
permanent storage before the host lost power) the cache will report a
miss. This causes httpcache to fall back to its underlying HTTP
transport (i.e. the real API server) and re-cache the resulting value.

Apart from adding CRC-32 checksums and avoiding calling fsync this
implementation differs from upstream httpcache's diskcache package in
that it uses FNV-32a hashes rather than MD5 hashes of cache keys in
order to generate filenames.

Signed-off-by: Nic Cope <nicc@rk0n.org>
2022-07-27 00:13:30 -07:00
..
bitbucket.org/bertimus9/systemstat Switch to release tag v0.5.0 of systemstat 2022-06-10 11:07:22 -04:00
cloud.google.com/go update kube-controller-manager dependencies 2022-06-23 18:07:18 +00:00
github.com Use checksums instead of fsyncs to manage discovery cache corruption 2022-07-27 00:13:30 -07:00
go.etcd.io update etcd packages to v3.5.4 2022-06-11 17:33:43 -04:00
go.opencensus.io Regenerate vendor 2022-05-04 10:27:41 -04:00
go.opentelemetry.io Regenerate vendor 2022-05-04 10:27:41 -04:00
go.starlark.net until stable: pin-dependency, update-vendor, update-bazel, lint-dep 2021-03-08 16:50:43 -08:00
go.uber.org Regenerate vendor 2022-05-04 10:27:41 -04:00
golang.org/x Build Ginkgo binary 2022-07-08 10:46:11 +08:00
gonum.org/v1/gonum hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
google.golang.org Bump cel-go to v0.12.0 2022-07-11 08:40:34 -07:00
gopkg.in e2e: adapt output tests to Ginkgo v2 and Gomega 1.19 2022-07-08 10:46:11 +08:00
k8s.io build: update to klog v2.70.1 2022-07-07 12:54:08 +02:00
sigs.k8s.io update kjson 2022-07-18 14:55:12 +00:00
modules.txt Use checksums instead of fsyncs to manage discovery cache corruption 2022-07-27 00:13:30 -07:00
OWNERS Add myself as a dep reviewer 2021-04-30 07:59:19 -07:00