pub struct WriteFanout<H, R> { /* private fields */ }Expand description
Coordinator that fans one logical insert out to registry + S/P/O.
Implementations§
Source§impl<H, R> WriteFanout<H, R>
impl<H, R> WriteFanout<H, R>
Sourcepub fn new(hexastore: H, registry: R, retry: RetryPolicy) -> Self
pub fn new(hexastore: H, registry: R, retry: RetryPolicy) -> Self
Build over injected clients (mocks in unit tests; tonic in integration).
Sourcepub fn retry_policy(&self) -> RetryPolicy
pub fn retry_policy(&self) -> RetryPolicy
Retry policy used for registry and hexastore RPCs.
Source§impl WriteFanout<GrpcHexastoreClients, GrpcRegistryClients>
impl WriteFanout<GrpcHexastoreClients, GrpcRegistryClients>
Sourcepub async fn connect(
config: &ClusterConfig,
retry: RetryPolicy,
) -> Result<Self, ComputeError>
pub async fn connect( config: &ClusterConfig, retry: RetryPolicy, ) -> Result<Self, ComputeError>
Connect tonic clients for every address in config.
Source§impl<H: HexastoreInsert + HexastoreGeo, R: StringRegister + BlobStoreClient> WriteFanout<H, R>
impl<H: HexastoreInsert + HexastoreGeo, R: StringRegister + BlobStoreClient> WriteFanout<H, R>
Sourcepub async fn insert_quad(
&self,
quad: &Quad,
commit_ts: CommitTs,
op: StorageOp,
visibility: VisibilityLabel,
) -> Result<InsertResult, ComputeError>
pub async fn insert_quad( &self, quad: &Quad, commit_ts: CommitTs, op: StorageOp, visibility: VisibilityLabel, ) -> Result<InsertResult, ComputeError>
Encode quad once, register hashed strings, then insert on S, P, and O.
Hexastore inserts run in parallel. A transient failure on one axis is
retried per RetryPolicy; if every axis fails, returns
ComputeError::AllAxesFailed.
Sourcepub async fn insert_quads(
&self,
quads: &[Quad],
commit_ts: CommitTs,
op: StorageOp,
visibility: VisibilityLabel,
) -> Result<InsertResult, ComputeError>
pub async fn insert_quads( &self, quads: &[Quad], commit_ts: CommitTs, op: StorageOp, visibility: VisibilityLabel, ) -> Result<InsertResult, ComputeError>
Batch encode → register → parallel fan-out for many quads at one timestamp.
Requests larger than INSERT_QUAD_CHUNK are split across multiple
InsertQuads RPCs per axis. Data-validity rules
([validate_type_objects]) run over the WHOLE slice before any chunk
ships: one offending quad rejects the entire request without partially
applying earlier chunks.
Source§impl<H: HexastoreFlush, R: StringRegistryFlush> WriteFanout<H, R>
impl<H: HexastoreFlush, R: StringRegistryFlush> WriteFanout<H, R>
Sourcepub async fn flush_memtables(&self) -> Result<(), ComputeError>
pub async fn flush_memtables(&self) -> Result<(), ComputeError>
Flush MemTables on S, P, O, and the string registry.
Hexastore axes and the registry run in parallel. Any failure after retries fails the whole call.
Source§impl<H: HexastoreCompact, R: StringRegistryCompact> WriteFanout<H, R>
impl<H: HexastoreCompact, R: StringRegistryCompact> WriteFanout<H, R>
Sourcepub async fn compact_range(&self) -> Result<(), ComputeError>
pub async fn compact_range(&self) -> Result<(), ComputeError>
Compact S, P, O, and the string registry.
Hexastore axes and the registry run in parallel. Any failure after retries fails the whole call.
Trait Implementations§
Source§impl<H: Clone, R: Clone> Clone for WriteFanout<H, R>
impl<H: Clone, R: Clone> Clone for WriteFanout<H, R>
Source§fn clone(&self) -> WriteFanout<H, R>
fn clone(&self) -> WriteFanout<H, R>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<H, R> Freeze for WriteFanout<H, R>
impl<H, R> RefUnwindSafe for WriteFanout<H, R>where
H: RefUnwindSafe,
R: RefUnwindSafe,
impl<H, R> Send for WriteFanout<H, R>
impl<H, R> Sync for WriteFanout<H, R>
impl<H, R> Unpin for WriteFanout<H, R>
impl<H, R> UnsafeUnpin for WriteFanout<H, R>where
H: UnsafeUnpin,
R: UnsafeUnpin,
impl<H, R> UnwindSafe for WriteFanout<H, R>where
H: UnwindSafe,
R: UnwindSafe,
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].