Skip to content

Commit

Permalink
Fixes #14414: resilient_server metrics name/prefix
Browse files Browse the repository at this point in the history
 logic is inverted, leading to no metrics being recorded

Signed-off-by: Jacques Grove <[email protected]>
  • Loading branch information
aquarapid committed Nov 1, 2023
1 parent 54eedf8 commit 374ca8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go/vt/srvtopo/resilient_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func NewResilientServer(ctx context.Context, base *topo.Server, counterPrefix st
}

var metric string
if counterPrefix == "" {
if counterPrefix != "" {
metric = counterPrefix + "Counts"
} else {
metric = ""
Expand Down
2 changes: 1 addition & 1 deletion go/vt/srvtopo/resilient_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ func TestSrvKeyspaceListener(t *testing.T) {
srvTopoCacheRefresh = 1 * time.Second
}()

rs := NewResilientServer(ctx, ts, "TestGetSrvKeyspaceWatcher")
rs := NewResilientServer(ctx, ts, "TestGetSrvKeyspaceListener")

cancelCtx, cancelFunc := context.WithCancel(context.Background())
var callbackCount atomic.Int32
Expand Down

0 comments on commit 374ca8b

Please sign in to comment.