Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
  • Loading branch information
CabinfeverB committed Jan 19, 2023
1 parent 16956b6 commit 37abfa8
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions pkg/mcs/resource_manager/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ const (
maxRetry = 3
)

var defaultWhiteList = map[string]struct{}{
"default": {},
"": {},
}

// ResourceGroupKVInterceptor is used as quato limit controller for resource group using kv store.
type ResourceGroupKVInterceptor interface {
// OnRequestWait is used to check whether resource group has enough tokens. It maybe needs wait some time.
Expand Down Expand Up @@ -319,9 +314,6 @@ func (c *ResourceGroupsController) mainLoop(ctx context.Context) {
func (c *ResourceGroupsController) OnRequestWait(
ctx context.Context, resourceGroupName string, info RequestInfo,
) (err error) {
if _, ok := defaultWhiteList[resourceGroupName]; ok {
return nil
}
var gc *groupCostController
if tmp, ok := c.groupsController.Load(resourceGroupName); ok {
gc = tmp.(*groupCostController)
Expand All @@ -337,9 +329,6 @@ func (c *ResourceGroupsController) OnRequestWait(

// OnResponse is used to consume tokens atfer receiving response
func (c *ResourceGroupsController) OnResponse(_ context.Context, resourceGroupName string, req RequestInfo, resp ResponseInfo) error {
if _, ok := defaultWhiteList[resourceGroupName]; ok {
return nil
}
tmp, ok := c.groupsController.Load(resourceGroupName)
if !ok {
log.Warn("[resource group] resourceGroupName is not existed.", zap.String("resourceGroupName", resourceGroupName))
Expand Down

0 comments on commit 37abfa8

Please sign in to comment.