From 52a616424ff4bfa4c3e787ebdc672e0f7870bd9b Mon Sep 17 00:00:00 2001 From: xxchan Date: Wed, 8 May 2024 16:50:05 +0800 Subject: [PATCH] fix: fix user manager refcount on startup (#16632) Signed-off-by: xxchan --- src/meta/src/manager/catalog/user.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/meta/src/manager/catalog/user.rs b/src/meta/src/manager/catalog/user.rs index 9b90e270cd11f..9bbb810afe395 100644 --- a/src/meta/src/manager/catalog/user.rs +++ b/src/meta/src/manager/catalog/user.rs @@ -67,6 +67,13 @@ impl UserManager { .map(|table| table.owner), ) .chain(database.views.values().map(|view| view.owner)) + .chain(database.functions.values().map(|function| function.owner)) + .chain( + database + .connections + .values() + .map(|connection| connection.owner), + ) .for_each(|owner_id| user_manager.increase_ref(owner_id)); Ok(user_manager)