From 847b79e1979a27bbad8547ef8a261e1aa6a7b751 Mon Sep 17 00:00:00 2001 From: congqixia Date: Thu, 21 Aug 2025 23:45:46 +0800 Subject: [PATCH] enhance: Use `RLock` for `ListPrivilegeGroups` (#43998) Related to #43901 Signed-off-by: Congqi Xia --- internal/rootcoord/meta_table.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/rootcoord/meta_table.go b/internal/rootcoord/meta_table.go index caf2ad3c9a..2be89d5c94 100644 --- a/internal/rootcoord/meta_table.go +++ b/internal/rootcoord/meta_table.go @@ -1673,8 +1673,8 @@ func (mt *MetaTable) DropPrivilegeGroup(ctx context.Context, groupName string) e } func (mt *MetaTable) ListPrivilegeGroups(ctx context.Context) ([]*milvuspb.PrivilegeGroupInfo, error) { - mt.permissionLock.Lock() - defer mt.permissionLock.Unlock() + mt.permissionLock.RLock() + defer mt.permissionLock.RUnlock() return mt.catalog.ListPrivilegeGroups(ctx) }