Skip to content

Commit

Permalink
do not check existance when add resource group
Browse files Browse the repository at this point in the history
  • Loading branch information
glorv committed Jun 29, 2023
1 parent 3b59a78 commit 7db5d8e
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions pkg/mcs/resourcemanager/server/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,6 @@ func (m *Manager) AddResourceGroup(grouppb *rmpb.ResourceGroup) error {
if grouppb.GetPriority() > 16 {
return errs.ErrInvalidGroup
}
m.RLock()
_, ok := m.groups[grouppb.Name]
m.RUnlock()
if ok {
return errs.ErrResourceGroupAlreadyExists.FastGenByArgs(grouppb.Name)
}
group := FromProtoResourceGroup(grouppb)
m.Lock()
defer m.Unlock()
Expand Down

0 comments on commit 7db5d8e

Please sign in to comment.