forked from scylladb/seastar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Metrics: Safer metadata transfer between shared
This patch change how metrics value and meta data is passed bewtween shards. Sometimes, a single shard send a metric report with data that is gothered from all other shards (i.e. The prometheus protocol). In those cases, the metrics layer need to pass information about the metrics (metadata) between the shards. 1. when reporting metrics, the values_copy structure now contains two values: * value - a vector of vectors of value (vector per metric family) * metadata - a shared_ptr of a vector of metric family data (that contains metric family info and a vector of metric metadata) 2. The metadata is created on demened * it uses a dirty bit to decide if the shared_ptr is valid or not 3. The metadata only contains information for enabled metrics, for efficiency, an additional vector is stored in the impl class that holds the function that fetch the values. The collectd and prometheus implementation where modified to use the new data structure. In prometheus an additional optimization is now possible. The data that is collected from all shards and does not merge into a single datastructure, instead, the merge is done while creating the reply. See scylladb/scylladb#2350 Signed-off-by: Amnon Heiman <[email protected]>
- Loading branch information
Showing
4 changed files
with
344 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.