pub struct Pointer {
pub seq: u64,
pub entries_key: Option<String>,
pub entries_seq: Option<u64>,
pub chunks: Option<Vec<ChunkRef>>,
pub pinned_reads: bool,
pub sole_writer: bool,
pub boundary_source: Option<String>,
pub epoch: u64,
}Expand description
The bucket-current manifest + its document ETag (the CAS token).
The pointer document at <prefix>/.flint/lean/current — the ONLY
mutable metadata object under the pointer layout (design of record:
docs/plans/flint-lean-manifest-pointer-design.md).
Everything a reader needs before it decides whether to fetch entries at all lives here, so the barrier’s idle tick reads a few hundred bytes instead of a document that runs to 264 MiB at 1M entries.
Fields§
§seq: u64The manifest generation this pointer publishes. Bumped by a
citation AND by a takeover rotation, which is why it is not the
same number as entries_seq.
entries_key: Option<String>The single immutable object holding every entry of this
generation — the step-one layout. None on a CHUNKED pointer.
Optional here and REQUIRED in the step-one binary’s schema, and
that asymmetry is the migration: a step-one reader handed a
chunked pointer fails to parse it and refuses, rather than
decoding a pointer it half-understands. manifest::load maps a
missing object to Ok(None), None means FIRST WRITE, and a
barrier answers that with If-None-Match: * — so every layout
change has to make an old reader refuse rather than conclude the
project is empty. Do not give this field a serde default in a
released binary; that is what makes the refusal work.
entries_seq: Option<u64>The seq the entries object was written under. A rotation
leaves this ALONE while bumping seq, which is exactly what
lets a follower skip the entries GET after a takeover.
chunks: Option<Vec<ChunkRef>>The chunk list — the step-two layout. Some(vec![]) is a
legitimately EMPTY project and is distinguishable from absence,
which is why this is an Option around a Vec rather than a bare
Vec with a default.
pinned_reads: bool§sole_writer: boolCarried here as well as on the manifest because the pointer is the authority for the fields it carries, and a reader that reconstructs a manifest from it must not lose the flag that decides whether it may adopt.
boundary_source: Option<String>§epoch: u64The epoch that installed this pointer. Diagnostic; the fence is the CAS, not this field.
Implementations§
Source§impl Pointer
impl Pointer
Sourcepub fn entries(&self) -> LeanResult<Entries<'_>>
pub fn entries(&self) -> LeanResult<Entries<'_>>
Resolve the layout, refusing anything ambiguous.
BOTH forms present, or NEITHER, is malformed and must fail — never pick one. A pointer carrying both would let two readers that broke the tie differently disagree about the contents of the same seq, which is the one thing a single visible object was supposed to make impossible.