fix(prune-cache): close the reader-marker check-then-delete window #2
@@ -45,7 +45,7 @@
|
|||||||
# renamed and not yet decided about; reclaiming that one lets `rm -rf`
|
# renamed and not yet decided about; reclaiming that one lets `rm -rf`
|
||||||
# empty a tree its owner may still restore under a live cache name. Its
|
# empty a tree its owner may still restore under a live cache name. Its
|
||||||
# fixture is an OLD directory renamed a moment ago — production's shape,
|
# fixture is an OLD directory renamed a moment ago — production's shape,
|
||||||
# and the only shape that can tell the two timestamps apart.
|
# and what lets it tell the two timestamps apart.
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||||
. "$script_dir/cache-lib.sh"
|
. "$script_dir/cache-lib.sh"
|
||||||
|
|||||||
@@ -92,9 +92,10 @@ STALE_LOCK_SECONDS="${STALE_LOCK_SECONDS:-7200}"
|
|||||||
# and it separates them without having to identify the pass that created it.
|
# and it separates them without having to identify the pass that created it.
|
||||||
# The `$$` in an aside's name was that pass's PID inside its own job
|
# The `$$` in an aside's name was that pass's PID inside its own job
|
||||||
# container, so testing it with `kill -0` from a different one is not
|
# container, so testing it with `kill -0` from a different one is not
|
||||||
# unreliable, it is meaningless — and PIDs recycle besides. Three orders of magnitude of headroom over the operation it covers,
|
# unreliable, it is meaningless — and PIDs recycle besides. Three orders of
|
||||||
# and short enough that a genuine leftover is reclaimed by the next run rather
|
# magnitude of headroom over the operation it covers, and short enough that a
|
||||||
# than lingering while the volume is under pressure.
|
# genuine leftover is reclaimed by the next run rather than lingering while
|
||||||
|
# the volume is under pressure.
|
||||||
EVICTION_ASIDE_SETTLE_SECONDS="${EVICTION_ASIDE_SETTLE_SECONDS:-60}"
|
EVICTION_ASIDE_SETTLE_SECONDS="${EVICTION_ASIDE_SETTLE_SECONDS:-60}"
|
||||||
|
|
||||||
declare -A protected_ns=()
|
declare -A protected_ns=()
|
||||||
|
|||||||
Reference in New Issue
Block a user