enhance: [2.5] Use RLock for ListPrivilegeGroups (#43998) (#44006)

Cherry-pick from master
pr: #43998
Related to #43901

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2025-08-22 10:31:47 +08:00 committed by GitHub
parent 199002f9e3
commit 0fceece818
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1625,8 +1625,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)
}