another tabledb fix

This commit is contained in:
John Smith 2023-06-18 21:34:40 -04:00
parent 2314fcb57e
commit e2824da06e

View File

@ -557,15 +557,15 @@ impl TableStore {
let deleted = self.table_store_driver.delete(&table_name).await?; let deleted = self.table_store_driver.delete(&table_name).await?;
if !deleted { if !deleted {
// Table missing? Just remove name // Table missing? Just remove name
self.name_delete(&name)
.await
.expect("failed to delete name");
warn!( warn!(
"table existed in name table but not in storage: {} : {}", "table existed in name table but not in storage: {} : {}",
name, table_name name, table_name
); );
return Ok(false);
} }
self.name_delete(&name)
.await
.expect("failed to delete name");
self.flush().await;
Ok(true) Ok(true)
} }
@ -581,6 +581,8 @@ impl TableStore {
} }
} }
trace!("TableStore::rename {} -> {}", old_name, new_name); trace!("TableStore::rename {} -> {}", old_name, new_name);
self.name_rename(old_name, new_name).await self.name_rename(old_name, new_name).await?;
self.flush().await;
Ok(())
} }
} }