From ce6c8decf86e0aede3c1e07d59c374731fb52517 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 8 May 2024 09:29:09 +0000 Subject: [PATCH] fix: fix user manager refcount on startup (#16632) (#16634) Signed-off-by: xxchan Co-authored-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 0da37291a1634..f4f407c513724 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)