risingwave_meta::model

Type Alias BTreeMapTransaction

source
pub type BTreeMapTransaction<'a, K, V> = BTreeMapTransactionInner<K, V, &'a mut BTreeMap<K, V>>;

Aliased Type§

struct BTreeMapTransaction<'a, K, V> {
    tree_ref: &'a mut BTreeMap<K, V>,
    staging: BTreeMap<K, BTreeMapOp<V>>,
}

Fields§

§tree_ref: &'a mut BTreeMap<K, V>

A reference to the original BTreeMap. All access to this field should be immutable, except when we commit the staging changes to the original map.

§staging: BTreeMap<K, BTreeMapOp<V>>

Store all the staging changes that will be applied to the original map on commit

Implementations§

source§

impl BTreeMapTransaction<'_, CompactionGroupId, CompactionGroup>

source

pub fn try_create_compaction_groups( &mut self, compaction_group_ids: &[CompactionGroupId], config: Arc<CompactionConfig>, ) -> bool

Inserts compaction group configs if they do not exist.

source

pub fn create_compaction_groups( &mut self, compaction_group_id: CompactionGroupId, config: Arc<CompactionConfig>, )

source

pub(crate) fn try_get_compaction_group_config( &self, compaction_group_id: CompactionGroupId, ) -> Option<&CompactionGroup>

Tries to get compaction group config for compaction_group_id.

source

pub fn purge(&mut self, existing_groups: HashSet<CompactionGroupId>)

Removes stale group configs.

source

pub(crate) fn update_compaction_config( &mut self, compaction_group_ids: &[CompactionGroupId], config_to_update: &[MutableConfig], ) -> Result<HashMap<CompactionGroupId, CompactionGroup>>