pub async fn snapshot_to_persisting(
        &self,
        partition_info: &PartitionInfo,
    ) -> Option<Arc<PersistingBatch>> {
        if let Some(table_data) = self.table_data(&partition_info.table_name) {
            let mut table_data = table_data.write().await;

            return table_data
                .partition_data
                .get_mut(&partition_info.partition.partition_key)
                .and_then(|partition_data| {
                    partition_data.snapshot_to_persisting_batch(
                        partition_info.partition.sequencer_id,
                        partition_info.partition.table_id,
                        partition_info.partition.id,
                        &partition_info.table_name,
                    )
                });
        }

        None
    }
/// Snapshots the mutable buffer for the partition, which clears it out and then moves all
/// snapshots over to a persisting batch, which is returned. If there is no data to snapshot
/// or persist, None will be returned.
Snapshots the mutable buffer for the partition, which clears it out and then moves all
snapshots over to a persisting batch, which is returned. If there is no data to snapshot
or persist, None will be returned.
Snapshots the mutable buffer for the partition which clears it out and then moves all snapshots over to a persisting batch which is returned . If there is no data to snapshot or persist None will be returned .
pub async fn snapshot_to_persisting(
        &self,
        partition_info: &PartitionInfo,
    ) -> Option<Arc<PersistingBatch>> {
        if let Some(table_data) = self.table_data(&partition_info.table_name) {
            let mut table_data = table_data.write().await;
            return table_data
                .partition_data
                .get_mut(&partition_info.partition.partition_key)
                .and_then(|partition_data| {
                    partition_data.snapshot_to_persisting_batch(
                        partition_info.partition.sequencer_id,
                        partition_info.partition.table_id,
                        partition_info.partition.id,
                        &partition_info.table_name,
                    )
                });
        }
        None
    }
pub async fn snapshot_to_persisting ( & self , partition_info : & PartitionInfo , ) -> Option < Arc < PersistingBatch > > { if let Some ( table_data ) = self . table_data ( & partition_info . table_name ) { let mut table_data = table_data . write ( ) . await ; return table_data . partition_data . get_mut ( & partition_info . partition . partition_key ) . and_then ( | partition_data | { partition_data . snapshot_to_persisting_batch ( partition_info . partition . sequencer_id , partition_info . partition . table_id , partition_info . partition . id , & partition_info . table_name , ) } ) ; } None }
Snapshots the mutable buffer for the partition, which clears it out and then moves all
snapshots over to a persisting batch, which is returned.
Snapshots the mutable buffer for the partition which clears it out and then moves all snapshots over to a persisting batch which is returned .
&self
partition_info
&PartitionInfo
&self
partition_info
&PartitionInfo