Struct mz_storage::controller::StorageControllerState
source · [−]pub struct StorageControllerState<T: Timestamp + Lattice + Codec64 + TimestampManipulation, S = Memory<Postgres>> {
pub(crate) collections: BTreeMap<GlobalId, CollectionState<T>>,
pub(crate) exports: BTreeMap<GlobalId, ExportState<T>>,
pub(crate) exported_collections: BTreeMap<GlobalId, Vec<GlobalId>>,
pub(crate) stash: S,
pub(crate) persist_write_handles: PersistWorker<T>,
persist_read_handles: PersistWorker<T>,
stashed_response: Option<StorageResponse<T>>,
pub(crate) collection_manager: CollectionManager,
pub(crate) introspection_ids: HashMap<IntrospectionType, GlobalId>,
}
Expand description
Controller state maintained for each storage instance.
Fields
collections: BTreeMap<GlobalId, CollectionState<T>>
Collections maintained by the storage controller.
This collection only grows, although individual collections may be rendered unusable. This is to prevent the re-binding of identifiers to other descriptions.
exports: BTreeMap<GlobalId, ExportState<T>>
exported_collections: BTreeMap<GlobalId, Vec<GlobalId>>
stash: S
persist_write_handles: PersistWorker<T>
Write handle for persist shards.
persist_read_handles: PersistWorker<T>
Read handles for persist shards.
These handles are on the other end of a Tokio task, so that work can be done asynchronously without blocking the storage controller.
stashed_response: Option<StorageResponse<T>>
collection_manager: CollectionManager
Interface for managed collections
introspection_ids: HashMap<IntrospectionType, GlobalId>
Tracks which collection is responsible for which IntrospectionType
.
Implementations
sourceimpl<T: Timestamp + Lattice + Codec64 + From<EpochMillis> + TimestampManipulation> StorageControllerState<T>
impl<T: Timestamp + Lattice + Codec64 + From<EpochMillis> + TimestampManipulation> StorageControllerState<T>
pub(crate) async fn new(
postgres_url: String,
tx: UnboundedSender<StorageResponse<T>>,
now: NowFn
) -> Self
Trait Implementations
Auto Trait Implementations
impl<T, S = Memory<Postgres>> !RefUnwindSafe for StorageControllerState<T, S>
impl<T, S> Send for StorageControllerState<T, S>where
S: Send,
impl<T, S> Sync for StorageControllerState<T, S>where
S: Sync,
impl<T, S> Unpin for StorageControllerState<T, S>where
S: Unpin,
T: Unpin,
impl<T, S = Memory<Postgres>> !UnwindSafe for StorageControllerState<T, S>
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
Mutably borrows from an owned value. Read more
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>
Wrap the input message
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>
See
RustType::from_proto
.sourcefn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See
RustType::into_proto
.