pub struct InflightDatabaseInfo {
pub(super) database_id: DatabaseId,
jobs: HashMap<JobId, InflightStreamingJobInfo>,
fragment_location: HashMap<FragmentId, JobId>,
pub(super) shared_actor_infos: SharedActorInfos,
}Fields§
§database_id: DatabaseId§jobs: HashMap<JobId, InflightStreamingJobInfo>§fragment_location: HashMap<FragmentId, JobId>Implementations§
Source§impl InflightDatabaseInfo
impl InflightDatabaseInfo
pub fn fragment_infos(&self) -> impl Iterator<Item = &InflightFragmentInfo> + '_
pub fn contains_job(&self, job_id: JobId) -> bool
pub(super) fn job_id_by_fragment( &self, fragment_id: FragmentId, ) -> Option<JobId>
pub fn fragment(&self, fragment_id: FragmentId) -> &InflightFragmentInfo
pub(super) fn backfill_fragment_ids_for_job( &self, job_id: JobId, ) -> MetaResult<HashSet<FragmentId>>
pub(super) fn is_backfill_fragment( &self, fragment_id: FragmentId, ) -> MetaResult<bool>
pub fn gen_backfill_progress( &self, ) -> impl Iterator<Item = (JobId, BackfillProgress)> + '_
pub fn gen_cdc_progress( &self, ) -> impl Iterator<Item = (JobId, CdcProgress)> + '_
pub fn gen_fragment_backfill_progress(&self) -> Vec<FragmentBackfillProgress>
pub(super) fn may_assign_fragment_cdc_backfill_splits( &mut self, fragment_id: FragmentId, ) -> MetaResult<Option<HashMap<ActorId, PbCdcTableSnapshotSplits>>>
pub(super) fn assign_cdc_backfill_splits( &mut self, job_id: JobId, ) -> MetaResult<Option<HashMap<ActorId, PbCdcTableSnapshotSplits>>>
pub(super) fn apply_collected_command( &mut self, command: &PostCollectCommand, resps: &HashMap<WorkerId, BarrierCompleteResponse>, version_stats: &HummockVersionStats, )
fn iter_creating_job_tracker( &self, ) -> impl Iterator<Item = &CreateMviewProgressTracker>
fn iter_mut_creating_job_tracker( &mut self, ) -> impl Iterator<Item = &mut CreateMviewProgressTracker>
pub(super) fn has_pending_finished_jobs(&self) -> bool
pub(super) fn take_pending_backfill_nodes(&mut self) -> Vec<FragmentId> ⓘ
pub(super) fn take_staging_commit_info(&mut self) -> StagingCommitInfo
pub fn fragment_subscribers( &self, fragment_id: FragmentId, ) -> impl Iterator<Item = SubscriberId> + '_
pub fn job_subscribers( &self, job_id: JobId, ) -> impl Iterator<Item = SubscriberId> + '_
pub fn max_subscription_retention( &self, ) -> impl Iterator<Item = (TableId, u64)> + '_
pub fn register_subscriber( &mut self, job_id: JobId, subscriber_id: SubscriberId, subscriber: SubscriberType, )
pub fn unregister_subscriber( &mut self, job_id: JobId, subscriber_id: SubscriberId, ) -> Option<SubscriberType>
pub fn update_subscription_retention( &mut self, job_id: JobId, subscriber_id: SubscriberId, retention_second: u64, )
fn fragment_mut( &mut self, fragment_id: FragmentId, ) -> (&mut InflightFragmentInfo, JobId)
fn empty_inner( database_id: DatabaseId, shared_actor_infos: SharedActorInfos, ) -> Self
pub fn empty( database_id: DatabaseId, shared_actor_infos: SharedActorInfos, ) -> Self
pub fn recover( database_id: DatabaseId, jobs: impl Iterator<Item = InflightStreamingJobInfo>, shared_actor_infos: SharedActorInfos, ) -> Self
pub fn is_empty(&self) -> bool
pub fn add_existing(&mut self, job: InflightStreamingJobInfo)
Sourcepub(crate) fn pre_apply_new_job(
&mut self,
job_id: JobId,
cdc_table_backfill_tracker: Option<CdcTableBackfillTracker>,
)
pub(crate) fn pre_apply_new_job( &mut self, job_id: JobId, cdc_table_backfill_tracker: Option<CdcTableBackfillTracker>, )
Register a new streaming job entry (with empty fragment_infos).
Sourcepub(crate) fn pre_apply_new_fragments(
&mut self,
fragments: impl IntoIterator<Item = (FragmentId, JobId, InflightFragmentInfo)>,
)
pub(crate) fn pre_apply_new_fragments( &mut self, fragments: impl IntoIterator<Item = (FragmentId, JobId, InflightFragmentInfo)>, )
Add new fragment infos and update shared actor infos.
Sourcepub(crate) fn pre_apply_reschedule(
&mut self,
fragment_id: FragmentId,
new_actors: HashMap<ActorId, InflightActorInfo>,
actor_update_vnode_bitmap: HashMap<ActorId, Bitmap>,
actor_splits: HashMap<ActorId, Vec<SplitImpl>>,
)
pub(crate) fn pre_apply_reschedule( &mut self, fragment_id: FragmentId, new_actors: HashMap<ActorId, InflightActorInfo>, actor_update_vnode_bitmap: HashMap<ActorId, Bitmap>, actor_splits: HashMap<ActorId, Vec<SplitImpl>>, )
Pre-apply reschedule: update actors, vnode bitmaps, and splits.
The actual removal of old actors happens in post_apply_reschedules.
Sourcepub(crate) fn pre_apply_replace_node_upstream(
&mut self,
fragment_id: FragmentId,
replace_map: &HashMap<FragmentId, FragmentId>,
)
pub(crate) fn pre_apply_replace_node_upstream( &mut self, fragment_id: FragmentId, replace_map: &HashMap<FragmentId, FragmentId>, )
Replace upstream fragment IDs in merge nodes of a fragment’s stream graph.
Sourcepub(crate) fn pre_apply_add_node_upstream(
&mut self,
fragment_id: FragmentId,
new_upstream_info: &PbUpstreamSinkInfo,
)
pub(crate) fn pre_apply_add_node_upstream( &mut self, fragment_id: FragmentId, new_upstream_info: &PbUpstreamSinkInfo, )
Add a new upstream sink node to a fragment’s UpstreamSinkUnion.
Sourcepub(crate) fn pre_apply_drop_node_upstream(
&mut self,
fragment_id: FragmentId,
drop_upstream_fragment_ids: &[FragmentId],
)
pub(crate) fn pre_apply_drop_node_upstream( &mut self, fragment_id: FragmentId, drop_upstream_fragment_ids: &[FragmentId], )
Remove upstream sink nodes from a fragment’s UpstreamSinkUnion.
Sourcepub(crate) fn pre_apply_throttle(
&mut self,
fragment_id: FragmentId,
config: &ThrottleConfig,
)
pub(crate) fn pre_apply_throttle( &mut self, fragment_id: FragmentId, config: &ThrottleConfig, )
Sync inflight nodes.rate_limit so a later reschedule won’t materialize new actors
from stale data. Mirrors controller/streaming_job.rs::update_*_rate_limit_by_*.
Sourcepub(crate) fn pre_apply_split_assignments(
&mut self,
assignments: impl IntoIterator<Item = (FragmentId, HashMap<ActorId, Vec<SplitImpl>>)>,
)
pub(crate) fn pre_apply_split_assignments( &mut self, assignments: impl IntoIterator<Item = (FragmentId, HashMap<ActorId, Vec<SplitImpl>>)>, )
Update split assignments for actors in fragments.
pub(super) fn build_edge( &self, info: Option<(&CreateStreamingJobCommandInfo, bool)>, replace_job: Option<&ReplaceStreamJobPlan>, new_upstream_sink: Option<&UpstreamSinkInfo>, control_stream_manager: &ControlStreamManager, stream_actors: &HashMap<FragmentId, Vec<StreamActor>>, actor_location: &HashMap<ActorId, WorkerId>, ) -> FragmentEdgeBuildResult
Sourcepub(crate) fn post_apply_reschedules(
&mut self,
reschedules: impl IntoIterator<Item = (FragmentId, HashSet<ActorId>)>,
)
pub(crate) fn post_apply_reschedules( &mut self, reschedules: impl IntoIterator<Item = (FragmentId, HashSet<ActorId>)>, )
Post-apply reschedule: remove actors that were marked for removal.
Sourcepub(crate) fn post_apply_remove_fragments(
&mut self,
fragment_ids: impl IntoIterator<Item = FragmentId>,
)
pub(crate) fn post_apply_remove_fragments( &mut self, fragment_ids: impl IntoIterator<Item = FragmentId>, )
Post-apply fragment removal: remove fragments and their jobs if empty.
pub(crate) fn post_apply_remove_job( &mut self, job_id: JobId, ) -> Option<InflightStreamingJobInfo>
Source§impl InflightDatabaseInfo
impl InflightDatabaseInfo
pub fn contains_worker(&self, worker_id: WorkerId) -> bool
pub fn existing_table_ids(&self) -> impl Iterator<Item = TableId> + '_
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InflightDatabaseInfo
impl !RefUnwindSafe for InflightDatabaseInfo
impl Send for InflightDatabaseInfo
impl Sync for InflightDatabaseInfo
impl Unpin for InflightDatabaseInfo
impl !UnwindSafe for InflightDatabaseInfo
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more§impl<T> AsAny for T
impl<T> AsAny for T
§fn any_ref(&self) -> &(dyn Any + Sync + Send + 'static)
fn any_ref(&self) -> &(dyn Any + Sync + Send + 'static)
dyn Any reference to the object: Read more§fn as_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
fn as_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
Arc<dyn Any> reference to the object: Read more§fn into_any(self: Box<T>) -> Box<dyn Any + Sync + Send>
fn into_any(self: Box<T>) -> Box<dyn Any + Sync + Send>
Box<dyn Any>: Read more§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
std::any::type_name, since Any does not provide it and
Any::type_id is useless as a debugging aid (its Debug is just a mess of hex digits).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
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§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<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
§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].Source§impl<M> MetricVecRelabelExt for M
impl<M> MetricVecRelabelExt for M
Source§fn relabel(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level.Source§fn relabel_n(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
relabel_num: usize,
) -> RelabeledMetricVec<M>
fn relabel_n( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, relabel_num: usize, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level_relabel_n.Source§fn relabel_debug_1(
self,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel_debug_1( self, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level_relabel_n with metric_level set to
MetricLevel::Debug and relabel_num set to 1.§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> Scope for T
impl<T> Scope for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.