-
Notifications
You must be signed in to change notification settings - Fork 4.1k
storage: Remove or fix "initial metrics computation" #13560
Copy link
Copy link
Closed
Labels
C-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.
Milestone
Description
As soon as gossip is connected, we attempt to compute the store metrics:
cockroach/pkg/storage/store.go
Lines 1250 to 1262 in 6e9c78f
| s.stopper.RunWorker(func() { | |
| select { | |
| case <-s.cfg.Gossip.Connected: | |
| s.scanner.Start(s.cfg.Clock, s.stopper) | |
| case <-s.stopper.ShouldStop(): | |
| return | |
| } | |
| }) | |
| // Run metrics computation up front to populate initial statistics. | |
| if err = s.ComputeMetrics(ctx, -1); err != nil { | |
| log.Infof(ctx, "%s: failed initial metrics computation: %s", s, err) | |
| } |
This (nearly) always fails because gossip becomes connected before the system config is available. It logs a INFO message and then we discard the error. (This line appears in the logs of nearly all our tests, and is the only message in the logs for many tests).
We should either wait for the system config to be available before computing metrics or remove the call completely since it's consistently failing.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.