Struct mz_compute_client::controller::ActiveInstance
source · [−]struct ActiveInstance<'a, T> {
compute: &'a mut Instance<T>,
storage_controller: &'a mut dyn StorageController<Timestamp = T>,
}
Expand description
A wrapper around Instance
with a live storage controller.
Fields
compute: &'a mut Instance<T>
storage_controller: &'a mut dyn StorageController<Timestamp = T>
Implementations
sourceimpl<'a, T> ActiveInstance<'a, T>where
T: Timestamp + Lattice,
ComputeGrpcClient: ComputeClient<T>,
impl<'a, T> ActiveInstance<'a, T>where
T: Timestamp + Lattice,
ComputeGrpcClient: ComputeClient<T>,
sourcefn add_replica(
&mut self,
id: ReplicaId,
addrs: Vec<String>,
logging: ComputeReplicaLogging,
communication_config: CommunicationConfig
) -> Result<(), ComputeError>
fn add_replica(
&mut self,
id: ReplicaId,
addrs: Vec<String>,
logging: ComputeReplicaLogging,
communication_config: CommunicationConfig
) -> Result<(), ComputeError>
Add a new instance replica, by ID.
sourcefn remove_replica(&mut self, id: ReplicaId)
fn remove_replica(&mut self, id: ReplicaId)
Remove an existing instance replica, by ID.
sourceasync fn create_dataflows(
&mut self,
dataflows: Vec<DataflowDescription<Plan<T>, (), T>>
) -> Result<(), ComputeError>
async fn create_dataflows(
&mut self,
dataflows: Vec<DataflowDescription<Plan<T>, (), T>>
) -> Result<(), ComputeError>
Create the described dataflows and initializes state for their output.
sourceasync fn drop_collections(
&mut self,
ids: Vec<GlobalId>
) -> Result<(), ComputeError>
async fn drop_collections(
&mut self,
ids: Vec<GlobalId>
) -> Result<(), ComputeError>
Drops the read capability for the given collections and allows their resources to be reclaimed.
sourceasync fn peek(
&mut self,
id: GlobalId,
literal_constraints: Option<Vec<Row>>,
uuid: Uuid,
timestamp: T,
finishing: RowSetFinishing,
map_filter_project: SafeMfpPlan,
target_replica: Option<ReplicaId>
) -> Result<(), ComputeError>
async fn peek(
&mut self,
id: GlobalId,
literal_constraints: Option<Vec<Row>>,
uuid: Uuid,
timestamp: T,
finishing: RowSetFinishing,
map_filter_project: SafeMfpPlan,
target_replica: Option<ReplicaId>
) -> Result<(), ComputeError>
Initiate a peek request for the contents of id
at timestamp
.
sourceasync fn cancel_peeks(
&mut self,
uuids: BTreeSet<Uuid>
) -> Result<(), ComputeError>
async fn cancel_peeks(
&mut self,
uuids: BTreeSet<Uuid>
) -> Result<(), ComputeError>
Cancels existing peek requests.
sourceasync fn set_read_policy(
&mut self,
policies: Vec<(GlobalId, ReadPolicy<T>)>
) -> Result<(), ComputeError>
async fn set_read_policy(
&mut self,
policies: Vec<(GlobalId, ReadPolicy<T>)>
) -> Result<(), ComputeError>
Assigns a read policy to specific identifiers.
The policies are assigned in the order presented, and repeated identifiers should conclude with the last policy. Changing a policy will immediately downgrade the read capability if appropriate, but it will not “recover” the read capability if the prior capability is already ahead of it.
Identifiers not present in policies
retain their existing read policies.
sourcefn update_max_result_size(&mut self, max_result_size: u32)
fn update_max_result_size(&mut self, max_result_size: u32)
Update the max size in bytes of any result.
sourcefn validate_ids(
&self,
ids: impl Iterator<Item = GlobalId>
) -> Result<(), ComputeError>
fn validate_ids(
&self,
ids: impl Iterator<Item = GlobalId>
) -> Result<(), ComputeError>
Validate that a collection exists for all identifiers, and error if any do not.
sourceasync fn update_write_frontiers(
&mut self,
updates: &[(GlobalId, FrontierBounds<T>)]
) -> Result<(), ComputeError>
async fn update_write_frontiers(
&mut self,
updates: &[(GlobalId, FrontierBounds<T>)]
) -> Result<(), ComputeError>
Accept write frontier updates from the compute layer.
sourceasync fn update_read_capabilities(
&mut self,
updates: &mut BTreeMap<GlobalId, ChangeBatch<T>>
) -> Result<(), ComputeError>
async fn update_read_capabilities(
&mut self,
updates: &mut BTreeMap<GlobalId, ChangeBatch<T>>
) -> Result<(), ComputeError>
Applies updates
, propagates consequences through other read capabilities, and sends an appropriate compaction command.
sourceasync fn remove_peeks(
&mut self,
peek_ids: &BTreeSet<Uuid>
) -> Result<(), ComputeError>
async fn remove_peeks(
&mut self,
peek_ids: &BTreeSet<Uuid>
) -> Result<(), ComputeError>
Removes a registered peek, unblocking compaction that might have waited on it.
sourceasync fn allow_compaction(
&mut self,
frontiers: Vec<(GlobalId, Antichain<T>)>
) -> Result<(), ComputeError>
async fn allow_compaction(
&mut self,
frontiers: Vec<(GlobalId, Antichain<T>)>
) -> Result<(), ComputeError>
Downgrade the read capabilities of specific identifiers to specific frontiers.
Downgrading any read capability to the empty frontier will drop the item and eventually reclaim its resources.
Trait Implementations
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for ActiveInstance<'a, T>
impl<'a, T> Send for ActiveInstance<'a, T>where
T: Send,
impl<'a, T> !Sync for ActiveInstance<'a, T>
impl<'a, T> Unpin for ActiveInstance<'a, T>
impl<'a, T> !UnwindSafe for ActiveInstance<'a, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> FutureExt for T
impl<T> FutureExt for T
sourcefn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourcefn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
sourcefn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.sourcefn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.