diff --git a/src/frontend/src/instance/distributed.rs b/src/frontend/src/instance/distributed.rs index 0e8314da5efb..50cf35e60545 100644 --- a/src/frontend/src/instance/distributed.rs +++ b/src/frontend/src/instance/distributed.rs @@ -150,10 +150,7 @@ impl DistInstance { } ); - // Since the table information created on meta does not go through KvBackend, so we - // manually invalidate the cache here. - // - // TODO(fys): when the meta invalidation cache mechanism is established, remove it. + // Invalidates local cache ASAP. self.catalog_manager .invalidate_table( &table_name.catalog_name, @@ -193,10 +190,7 @@ impl DistInstance { .await .context(CatalogSnafu)?; - // Since the table information dropped on meta does not go through KvBackend, so we - // manually invalidate the cache here. - // - // TODO(fys): when the meta invalidation cache mechanism is established, remove it. + // Invalidates local cache ASAP. self.catalog_manager() .invalidate_table( &table_name.catalog_name, @@ -556,6 +550,11 @@ impl DistInstance { .await .context(error::RequestMetaSnafu)?; + // Invalidates local cache ASAP. + self.catalog_manager() + .invalidate_table(&catalog_name, &schema_name, &table_name, table_id) + .await; + Ok(Output::AffectedRows(0)) }