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
56
57
58
59
60
61
62
// SPDX-License-Identifier: BUSL-1.1
//! On-disk types for the sparse-vector checkpoint.
//!
//! Only the manifest is defined here. The per-index files carry the raw bytes
//! `SparseInvertedIndex::checkpoint_to_bytes` produces, unwrapped: the index
//! codec already owns its own encoding, and the whole generation's version and
//! LSN belong on the manifest that publishes it rather than repeated in every
//! file — a per-file stamp could disagree between indexes, which is exactly the
//! split the generation exists to make unrepresentable.
use ;
/// On-disk format version for the manifest and the generation it names.
///
/// A manifest stamped with any other version is refused rather than misparsed.
/// Refusing costs a WAL replay; misparsing would install indexes built from
/// bytes this build cannot read.
pub const SPARSE_VECTOR_CKPT_FORMAT_VERSION: u16 = 1;
/// Names the live generation. Writing this file is what publishes a checkpoint.
pub
/// Encode a manifest publishing `generation`, for tests that need a live
/// generation on disk without driving a whole core through a flush.
///
/// Shares this module's writer so a test's idea of "published" can never drift
/// from the real one — a test fixture that hand-rolled the bytes would keep
/// passing after a format change that broke production.
pub