1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2026-present, Dmitry Prudnikov
//! The hold a write keeps on the policy it resolved its dictionaries from.
use RuntimeConfig;
use Arc;
/// Keeps the dictionaries a write's files name out of a dictionary collection
/// until those files are installed.
///
/// A write resolves its dictionary from the policy snapshot it started under,
/// and a collection spares every dictionary a still-held snapshot names, however
/// the policy has changed since. The pin is that hold, owned by the operation
/// rather than its writers, since finishing a writer comes before the install:
/// drop it only once the files it covers are part of the tree, from which point
/// the files name the dictionary themselves. A flush and an ingestion carry it
/// from where their files are finished to where they are installed; a
/// compaction, which does both in one call, holds its snapshot directly. Always
/// empty in builds without zstd, which have no dictionaries to collect.