risingwave_hummock_sdk::version

Type Alias HummockVersion

source
pub type HummockVersion = HummockVersionCommon<SstableInfo>;

Aliased Type§

struct HummockVersion {
    pub id: HummockVersionId,
    pub levels: HashMap<u64, LevelsCommon<SstableInfo>>,
    pub(crate) max_committed_epoch: u64,
    pub table_watermarks: HashMap<TableId, Arc<TableWatermarks>>,
    pub table_change_log: HashMap<TableId, TableChangeLogCommon<SstableInfo>>,
    pub state_table_info: HummockVersionStateTableInfo,
}

Fields§

§id: HummockVersionId§levels: HashMap<u64, LevelsCommon<SstableInfo>>§max_committed_epoch: u64
👎Deprecated
§table_watermarks: HashMap<TableId, Arc<TableWatermarks>>§table_change_log: HashMap<TableId, TableChangeLogCommon<SstableInfo>>§state_table_info: HummockVersionStateTableInfo

Implementations§

source§

impl HummockVersion

source

pub fn get_compaction_group_levels( &self, compaction_group_id: CompactionGroupId, ) -> &Levels

source

pub fn get_compaction_group_levels_mut( &mut self, compaction_group_id: CompactionGroupId, ) -> &mut Levels

source

pub fn get_sst_ids_by_group_id( &self, compaction_group_id: CompactionGroupId, ) -> impl Iterator<Item = u64> + '_

source

pub fn get_sst_infos_from_groups<'a>( &'a self, select_group: &'a HashSet<CompactionGroupId>, ) -> impl Iterator<Item = &'a SstableInfo> + 'a

get_sst_infos_from_groups doesn’t guarantee that all returned sst info belongs to select_group. i.e. select_group is just a hint. We separate get_sst_infos_from_groups and get_sst_infos because get_sst_infos_from_groups may be further customized in the future.

source

pub fn level_iter<F: FnMut(&Level) -> bool>( &self, compaction_group_id: CompactionGroupId, f: F, )

source

pub fn num_levels(&self, compaction_group_id: CompactionGroupId) -> usize

source

pub fn safe_epoch_table_watermarks( &self, existing_table_ids: &[u32], ) -> BTreeMap<u32, TableWatermarks>

source§

impl HummockVersion

source

pub fn count_new_ssts_in_group_split( &self, parent_group_id: CompactionGroupId, split_key: Bytes, ) -> u64

source

pub fn init_with_parent_group( &mut self, parent_group_id: CompactionGroupId, group_id: CompactionGroupId, member_table_ids: BTreeSet<StateTableId>, new_sst_start_id: u64, )

source

pub fn build_sst_delta_infos( &self, version_delta: &HummockVersionDelta, ) -> Vec<SstDeltaInfo>

source

pub fn apply_version_delta(&mut self, version_delta: &HummockVersionDelta)

source

pub fn apply_change_log_delta<T: Clone>( table_change_log: &mut HashMap<TableId, TableChangeLogCommon<T>>, change_log_delta: &HashMap<TableId, ChangeLogDeltaCommon<T>>, removed_table_ids: &HashSet<TableId>, state_table_info_delta: &HashMap<TableId, StateTableInfoDelta>, changed_table_info: &HashMap<TableId, Option<StateTableInfo>>, )

source

pub fn build_branched_sst_info( &self, ) -> BTreeMap<HummockSstableObjectId, BranchedSstInfo>

source

pub fn merge_compaction_group( &mut self, left_group_id: CompactionGroupId, right_group_id: CompactionGroupId, )

source

pub fn init_with_parent_group_v2( &mut self, parent_group_id: CompactionGroupId, group_id: CompactionGroupId, new_sst_start_id: u64, split_key: Option<Bytes>, )

source§

impl HummockVersion

source§

impl HummockVersion

Trait Implementations§

source§

impl Default for HummockVersion

source§

fn default() -> Self

Returns the “default value” for a type. Read more