Skip to content

Commit

Permalink
client: remove failed request metrics for background setting query (#…
Browse files Browse the repository at this point in the history
…7925)

close #7926

Signed-off-by: Cabinfever_B <[email protected]>
  • Loading branch information
CabinfeverB committed Mar 18, 2024
1 parent 5ebef84 commit da3b6e3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions client/resource_group/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,6 @@ func (c *ResourceGroupsController) IsBackgroundRequest(ctx context.Context,
resourceGroupName, requestResource string) bool {
gc, err := c.tryGetResourceGroup(ctx, resourceGroupName)
if err != nil {
failedRequestCounter.WithLabelValues(resourceGroupName).Inc()
return false
}

Expand All @@ -577,7 +576,6 @@ func (c *ResourceGroupsController) checkBackgroundSettings(ctx context.Context,
resourceGroupName := "default"
gc, err := c.tryGetResourceGroup(ctx, resourceGroupName)
if err != nil {
failedRequestCounter.WithLabelValues(resourceGroupName).Inc()
return false
}
bg = gc.getMeta().BackgroundSettings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1343,6 +1343,7 @@ func (suite *resourceManagerClientTestSuite) TestCheckBackgroundJobs() {
re.False(c.IsBackgroundRequest(suite.ctx, resourceGroupName, "internal_lightning"))
re.False(c.IsBackgroundRequest(suite.ctx, resourceGroupName, "internal_ddl"))
re.False(c.IsBackgroundRequest(suite.ctx, resourceGroupName, ""))
re.False(c.IsBackgroundRequest(suite.ctx, "none", "none"))

resourceGroupName = enableBackgroundGroup(true)
re.True(c.IsBackgroundRequest(suite.ctx, resourceGroupName, "internal_br"))
Expand Down

0 comments on commit da3b6e3

Please sign in to comment.