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?;
if !deleted {
// Table missing? Just remove name
self.name_delete(&name)
.await
.expect("failed to delete name");
warn!(
"table existed in name table but not in storage: {} : {}",
name, table_name
);
return Ok(false);
}
self.name_delete(&name)
.await
.expect("failed to delete name");
self.flush().await;
Ok(true)
}
@ -581,6 +581,8 @@ impl TableStore {
}
}
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(())
}
}