pub struct PreparedInsert {
pub object_rewrites: Vec<(usize, EncodedTerm)>,
pub blobs: Vec<(StrHash, Arc<[u8]>)>,
pub geo_puts: Vec<GeoIndexPut>,
pub temporal_puts: Vec<TemporalIndexPut>,
pub text_docs: Vec<TextIndexDoc>,
pub warnings: Vec<String>,
pub spike_reductions: u64,
}Expand description
What a WritePlugin returns for one insert batch.
Term rewriting is a sparse overlay: object_rewrites carries only the
quad positions the plugin actually rewrote (index into the input slice →
native object term), so several write plugins compose — each contributes
its own rewrites and postings over the same plain encoding of the input,
and the fan-out applies them in registration order (two plugins rewriting
one position with DIFFERENT terms is an error; the same term twice is
idempotent).
Fields§
§object_rewrites: Vec<(usize, EncodedTerm)>Sparse object rewrites: (input quad index, native object term).
Sorted by index ascending is not required (the applier tolerates any
order) but plugins emit ascending.
blobs: Vec<(StrHash, Arc<[u8]>)>Content-addressed blobs to put before hexastore inserts.
Payloads are shared from the plugin boundary on (Arc<[u8]>): the
write fan-out clones per batch frame and per retry attempt and
pre-warms the blob cache without ever copying payload bytes. The
encoder side (PreparedGeometryLiteral.blobs) still owns
Vec<u8> and converts with Arc::from — a move, not a copy.
geo_puts: Vec<GeoIndexPut>Opaque O-axis geometry-index postings (compute-derived S2 cells).
Sent with the same commit_ts as the hexastore records; on Delete
batches the fan-out discards them (term-liveness: postings are
keyed by term, never retracted on delete — the rebuilds GC them).
temporal_puts: Vec<TemporalIndexPut>Opaque O-axis temporal-index postings (compute-derived dyadic nodes).
Sent with the same commit_ts as the hexastore records; on Delete
batches the fan-out discards them (term-liveness: postings are
keyed by term, never retracted on delete — the rebuilds GC them).
text_docs: Vec<TextIndexDoc>Text-index documents (one per distinct string literal). Unlike the
geo / temporal postings these are sent BEFORE the three axis
InsertQuads calls (ordering C3: a visible row must never lack its
document), and Delete batches discard them exactly the same way —
documents are per-term and never retracted; the rebuild GCs.
warnings: Vec<String>Non-fatal diagnostics produced while preparing the batch. The write shells emit these after the batch commits successfully.
spike_reductions: u64Number of object rewrites accepted through zero-area geo spike reduction. Kept separate from generic warnings so import totals remain correct when other plugins add diagnostics.
Implementations§
Source§impl PreparedInsert
impl PreparedInsert
Sourcepub fn geo_posting_bytes(&self) -> usize
pub fn geo_posting_bytes(&self) -> usize
Encoded size of the geometry-index postings (wire budget accounting).
Sourcepub fn temporal_posting_bytes(&self) -> usize
pub fn temporal_posting_bytes(&self) -> usize
Encoded size of the temporal-index postings (wire budget accounting: 16-byte key + term + 8-byte ts + 37-byte value).
Trait Implementations§
Source§impl Clone for PreparedInsert
impl Clone for PreparedInsert
Source§fn clone(&self) -> PreparedInsert
fn clone(&self) -> PreparedInsert
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PreparedInsert
impl Debug for PreparedInsert
Source§impl Default for PreparedInsert
impl Default for PreparedInsert
Source§fn default() -> PreparedInsert
fn default() -> PreparedInsert
Auto Trait Implementations§
impl Freeze for PreparedInsert
impl RefUnwindSafe for PreparedInsert
impl Send for PreparedInsert
impl Sync for PreparedInsert
impl Unpin for PreparedInsert
impl UnsafeUnpin for PreparedInsert
impl UnwindSafe for PreparedInsert
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].