Commit ea92c6b
Merge #159046
159046: status: add node_id label to stores initialized after AddNode r=tbg a=tbg
Previously, when a node restarted with additional stores, the new stores
could be missing the node_id label in their metrics. This happened because
stores added to an existing node are initialized asynchronously via
initializeAdditionalStores, which can complete after recorder.AddNode has
already run. AddNode sets the node_id label on all stores currently in
storeRegistries, but AddStore didn't add the label for stores registered
later.
Fix this by having AddStore add the node_id label if AddNode has already
been called (i.e., if desc.NodeID is set). There's no risk of duplicate
labels since a store is either present when AddNode runs (and AddNode adds
the label) or added afterward (and AddStore adds it).
Fixes #159045
Release note (bug fix): Previously, when a node was restarted with additional stores for the first time, the metrics for these stores could be missing the node_id label.
Co-authored-by: Tobias Grieger <[email protected]>1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
348 | 356 | | |
349 | 357 | | |
350 | 358 | | |
| |||
0 commit comments