pub fn snapshot_to_persisting(
        &mut self,
        sequencer_id: SequencerId,
        table_id: TableId,
        partition_id: PartitionId,
        table_name: &str,
    ) -> Option<Arc<PersistingBatch>> {
        if self.persisting.is_some() {
            panic!("Unable to snapshot while persisting. This is an unexpected state.")
        }

        if let Some(queryable_batch) = self.snapshot_to_queryable_batch(table_name, None) {
            let persisting_batch = Arc::new(PersistingBatch {
                sequencer_id,
                table_id,
                partition_id,
                object_store_id: Uuid::new_v4(),
                data: Arc::new(queryable_batch),
            });

            self.persisting = Some(Arc::clone(&persisting_batch));

            Some(persisting_batch)
        } else {
            None
        }
    }
/// Snapshots the buffer and moves snapshots over to the `PersistingBatch`.
///
/// # Panic
///
/// Panics if there is already a persisting batch.
Snapshots the buffer and moves snapshots over to the `PersistingBatch`.
Snapshots the buffer and moves snapshots over to the ` PersistingBatch ` .
pub fn snapshot_to_persisting(
        &mut self,
        sequencer_id: SequencerId,
        table_id: TableId,
        partition_id: PartitionId,
        table_name: &str,
    ) -> Option<Arc<PersistingBatch>> {
        if self.persisting.is_some() {
            panic!("Unable to snapshot while persisting. This is an unexpected state.")
        }
        if let Some(queryable_batch) = self.snapshot_to_queryable_batch(table_name, None) {
            let persisting_batch = Arc::new(PersistingBatch {
                sequencer_id,
                table_id,
                partition_id,
                object_store_id: Uuid::new_v4(),
                data: Arc::new(queryable_batch),
            });
            self.persisting = Some(Arc::clone(&persisting_batch));
            Some(persisting_batch)
        } else {
            None
        }
    }
pub fn snapshot_to_persisting ( & mut self , sequencer_id : SequencerId , table_id : TableId , partition_id : PartitionId , table_name : & str , ) -> Option < Arc < PersistingBatch > > { if self . persisting . is_some ( ) { panic ! ( " " ) } if let Some ( queryable_batch ) = self . snapshot_to_queryable_batch ( table_name , None ) { let persisting_batch = Arc :: new ( PersistingBatch { sequencer_id , table_id , partition_id , object_store_id : Uuid :: new_v4 ( ) , data : Arc :: new ( queryable_batch ) , } ) ; self . persisting = Some ( Arc :: clone ( & persisting_batch ) ) ; Some ( persisting_batch ) } else { None } }
Snapshots the buffer and moves snapshots over to the `PersistingBatch`.
Snapshots the buffer and moves snapshots over to the ` PersistingBatch ` .
&mut self
sequencer_id
SequencerId
table_id
TableId
partition_id
PartitionId
table_name
&str
&mut self
sequencer_id
SequencerId
table_id
TableId
partition_id
PartitionId
table_name
&str
panic
Panics if there is already a persisting batch.
Panics if there is already a persisting batch .