pub async fn commit_and_prune_epoch( db: &DatabaseConnection, sink_id: SinkId, epoch: u64, prev_epoch: Option<u64>, ) -> Result<()>