3 ms·
One thing that isn't clear to me is how, in the next generation solution, the time series ID is obtained when a metric is written, to derive the inverted index.
by lopkeny12ko 2y ago
One thing that isn't clear to me is how, in the next generation solution, the time series ID is obtained when a metric is written, to derive the inverted index. The user only supplies the metric name and tags, how do you know that a particular combination should correspond to ID 1, 2, 3, etc?
- deleted 2y ago[deleted]
- misiek08 2y agoNot sure if I got the question, but during indexing e.g. cpu.total{env=prod,host=a} [id: 1] you insert cpu.total;env=prod and cpu.total;host=a entries with id 1. then you get cpu.total{env=prod,host=b} [id: 2] and you end up with 3 entries: cpu.total;env=prod => 1,2 cpu.total;host=a => 1 cpu.total;host=b => 2 If you query avg(cpu.total{env=prod}) you get [1, 2]. If you query avg(cpu.total{env=prod,host=a}) you get intersection([1, 2], [1]) which is [1].
- lopkeny12ko 2y ago> during indexing e.g. cpu.total{env=prod,host=a} [id: 1] Right, how do you know at write-time that cpu.total{env=prod,host=a} is ID 1? The user only supplies the metric name and tags.
- lopkeny12ko 2y agoLike, I can't imagine these are autoincrementing IDs. Because then every time a user writes a new value for cpu.total{env=prod,host=a}, you'd end up with a new unique timeseries ID.