/// Write data to object store and commit transaction to underlying catalog.
Write data to object store and commit transaction to underlying catalog.
Write data to object store and commit transaction to underlying catalog .
pub async fn commit(mut self) -> Result<()> {
        // write to object store
        self.transaction
            .as_mut()
            .expect("No transaction in progress?")
            .store(
                &self.catalog.object_store,
                self.catalog.server_id,
                &self.catalog.db_name,
            )
            .await?;
        // commit to catalog
        let t = std::mem::take(&mut self.transaction)
            .expect("calling .commit on a closed transaction?!");
        let tkey = t.tkey();
        let mut inner_guard = self.catalog.inner.write();
        t.commit(&mut inner_guard);
        drop(inner_guard);
        info!(?tkey, "transaction committed");
        Ok(())
    }
pub async fn commit ( mut self ) -> Result < ( ) > { // write to object store self . transaction . as_mut ( ) . expect ( " " ) . store ( & self . catalog . object_store , self . catalog . server_id , & self . catalog . db_name , ) . await ? ; // commit to catalog let t = std :: mem :: take ( & mut self . transaction ) . expect ( " " ) ; let tkey = t . tkey ( ) ; let mut inner_guard = self . catalog . inner . write ( ) ; t . commit ( & mut inner_guard ) ; drop ( inner_guard ) ; info ! ( tkey " " ) ; Ok ( ( ) ) }
Write data to object store and commit transaction to underlying catalog.
Write data to object store and commit transaction to underlying catalog .
mut self