pub fn register_checkpoints(
        &mut self,
        partition_checkpoint: &PartitionCheckpoint,
        database_checkpoint: &DatabaseCheckpoint,
    ) {
        match self.last_partition_checkpoints.entry((
            Arc::clone(partition_checkpoint.table_name()),
            Arc::clone(partition_checkpoint.partition_key()),
        )) {
            Vacant(v) => {
                // new partition => insert
                v.insert(partition_checkpoint.clone());
            }
            Occupied(mut o) => {
                // known partition, but added afterwards => insert
                o.insert(partition_checkpoint.clone());
            }
        }

        for (sequencer_id, min_max) in &database_checkpoint.sequencer_numbers {
            match self.replay_ranges.entry(*sequencer_id) {
                Vacant(v) => {
                    // unknown sequencer => store min value (we keep the latest value for that one) and max value (in
                    // case when we don't find another partition checkpoint for this sequencer, so we have a fallback)
                    v.insert(*min_max);
                }
                Occupied(mut o) => {
                    // known sequencer => take the alter value
                    o.insert(*min_max);
                }
            }
        }
    }
/// Register a partition and database checkpoint that was found in the catalog.
///
/// **Note: The checkpoints MUST be added in the same order as they where written to the preserved catalog!**
Register a partition and database checkpoint that was found in the catalog.
Note: The checkpoints MUST be added in the same order as they where written to the preserved catalog!
Register a partition and database checkpoint that was found in the catalog . Note : The checkpoints MUST be added in the same order as they where written to the preserved catalog!
pub fn register_checkpoints(
        &mut self,
        partition_checkpoint: &PartitionCheckpoint,
        database_checkpoint: &DatabaseCheckpoint,
    ) {
        match self.last_partition_checkpoints.entry((
            Arc::clone(partition_checkpoint.table_name()),
            Arc::clone(partition_checkpoint.partition_key()),
        )) {
            Vacant(v) => {
                // new partition => insert
                v.insert(partition_checkpoint.clone());
            }
            Occupied(mut o) => {
                // known partition, but added afterwards => insert
                o.insert(partition_checkpoint.clone());
            }
        }
        for (sequencer_id, min_max) in &database_checkpoint.sequencer_numbers {
            match self.replay_ranges.entry(*sequencer_id) {
                Vacant(v) => {
                    // unknown sequencer => store min value (we keep the latest value for that one) and max value (in
                    // case when we don't find another partition checkpoint for this sequencer, so we have a fallback)
                    v.insert(*min_max);
                }
                Occupied(mut o) => {
                    // known sequencer => take the alter value
                    o.insert(*min_max);
                }
            }
        }
    }
pub fn register_checkpoints ( & mut self , partition_checkpoint : & PartitionCheckpoint , database_checkpoint : & DatabaseCheckpoint , ) { match self . last_partition_checkpoints . entry ( ( Arc :: clone ( partition_checkpoint . table_name ( ) ) , Arc :: clone ( partition_checkpoint . partition_key ( ) ) , ) ) { Vacant ( v ) => { // new partition => insert v . insert ( partition_checkpoint . clone ( ) ) ; } Occupied ( mut o ) => { // known partition, but added afterwards => insert o . insert ( partition_checkpoint . clone ( ) ) ; } } for ( sequencer_id , min_max ) in & database_checkpoint . sequencer_numbers { match self . replay_ranges . entry ( * sequencer_id ) { Vacant ( v ) => { // unknown sequencer => store min value (we keep the latest value for that one) and max value (in // case when we don't find another partition checkpoint for this sequencer, so we have a fallback) v . insert ( * min_max ) ; } Occupied ( mut o ) => { // known sequencer => take the alter value o . insert ( * min_max ) ; } } } }
Register a partition and database checkpoint that was found in the catalog.
Register a partition and database checkpoint that was found in the catalog .
&mut self
partition_checkpoint
&PartitionCheckpoint
database_checkpoint
&DatabaseCheckpoint
&mut self
partition_checkpoint
&PartitionCheckpoint
database_checkpoint
&DatabaseCheckpoint