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: BUSL-1.1
//! On-disk type for the sync idempotency-gate checkpoint.
use ;
/// On-disk format version.
///
/// A file stamped with any other version is refused rather than misparsed.
/// Refusing costs a WAL replay; misparsing would install a gate whose
/// high-watermarks are wrong in an unknown direction — too low re-applies
/// duplicates, too high silently discards new writes as already-seen.
pub const SYNC_HWM_CKPT_FORMAT_VERSION: u16 = 1;
/// A core's whole sync gate, as one file.
///
/// The maps are stored as sorted vectors rather than maps because the encoder
/// gives a stable byte layout for them, and a checkpoint that re-encodes
/// identical state to identical bytes is far easier to reason about on disk.
pub