risingwave_pb::meta

Type Alias PbTableFragments

source
pub type PbTableFragments = TableFragments;
Expand description

Alias for TableFragments.

Aliased Type§

struct PbTableFragments {
    pub table_id: u32,
    pub state: i32,
    pub fragments: HashMap<u32, Fragment>,
    pub actor_status: HashMap<u32, ActorStatus>,
    pub actor_splits: HashMap<u32, ConnectorSplits>,
    pub ctx: Option<StreamContext>,
    pub parallelism: Option<TableParallelism>,
    pub max_parallelism: Option<u32>,
    pub node_label: String,
    pub backfill_done: bool,
}

Fields§

§table_id: u32§state: i32§fragments: HashMap<u32, Fragment>§actor_status: HashMap<u32, ActorStatus>§actor_splits: HashMap<u32, ConnectorSplits>

Source and SourceBackfill are handled together here.

§ctx: Option<StreamContext>§parallelism: Option<TableParallelism>§max_parallelism: Option<u32>

The max parallelism specified when the streaming job was created, i.e., expected vnode count.

The reason for persisting this value is mainly to check if a parallelism change (via ALTER .. SET PARALLELISM) is valid, so that the behavior can be consistent with the creation of the streaming job.

Note that the actual vnode count, denoted by vnode_count in fragments, may be different from this value (see StreamFragmentGraph.max_parallelism for more details.). As a result, checking the parallelism change with this value can be inaccurate in some cases. However, when generating resizing plans, we still take the vnode_count of each fragment into account.

Can be unset if the fragment is created in older versions where variable vnode count is not supported, in which case a default value of 256 should be used.

§node_label: String

Actors of a materialize view, sink, or table can only be scheduled on nodes with matching node_label.

§backfill_done: bool

If this is a materialized view: True if backfill is done, else false. If this is a regular table: Always true.