@@ -46,8 +46,19 @@ use crate::control::security::catalog::SystemCatalog;
4646/// developer runs instead of deferring to the next restart, so
4747/// reviewers don't need to rely on a user report to surface
4848/// half-finished sync work. Release builds skip the check.
49- pub fn apply_to ( entry : & CatalogEntry , catalog : & SystemCatalog ) {
50- apply_to_inner ( entry, catalog) ;
49+ pub fn apply_to ( entry : & CatalogEntry , catalog : & SystemCatalog ) -> bool {
50+ let applied = match entry {
51+ CatalogEntry :: PutTenantWithAdmin { tenant, admin } => {
52+ tenant:: put_with_admin ( tenant, admin, catalog)
53+ }
54+ _ => {
55+ apply_to_inner ( entry, catalog) ;
56+ true
57+ }
58+ } ;
59+ if !applied {
60+ return false ;
61+ }
5162 #[ cfg( debug_assertions) ]
5263 {
5364 // Narrow to OrphanRow — the "half-finished sync" class this
@@ -72,6 +83,7 @@ pub fn apply_to(entry: &CatalogEntry, catalog: &SystemCatalog) {
7283 orphans,
7384 ) ;
7485 }
86+ true
7587}
7688
7789fn apply_to_inner ( entry : & CatalogEntry , catalog : & SystemCatalog ) {
@@ -139,6 +151,8 @@ fn apply_to_inner(entry: &CatalogEntry, catalog: &SystemCatalog) {
139151 name,
140152 } => continuous_aggregate:: delete ( * database_id, * tenant_id, name, catalog) ,
141153 CatalogEntry :: PutTenant ( stored) => tenant:: put ( stored, catalog) ,
154+ // Applied by `apply_to` so its commit outcome can suppress post-apply.
155+ CatalogEntry :: PutTenantWithAdmin { .. } => { }
142156 CatalogEntry :: DeleteTenant { tenant_id } => tenant:: delete ( * tenant_id, catalog) ,
143157 CatalogEntry :: PutRlsPolicy ( stored) => rls:: put ( stored, catalog) ,
144158 CatalogEntry :: DeleteRlsPolicy {
0 commit comments