VictoriaMetrics/lib/promutils
Hui Wang 664f337c70
stream aggregation: fix possible duplicated aggregation results (#7118)
When ingesting samples with the same labels(duplicated samples or
samples with the same labels after `by` or `without` options). They
could register different entries for the same labelset in
LabelsCompressor.
For example, both index 99 and 100 can be assigned to label `foo=1` in
two concurrent pushes. Then due to differing label indexes in encoded
keys, the samples will appear as distinct in aggrState, resulting in
duplicated results after decompressing the label indexes.

fbde238cdc/lib/streamaggr/streamaggr.go (L933)

In this pull request, since we need to store `idxToLabel` first to
ensure the idx can be searched after `lc.labelToIdxStore`,
the `lc.idxToLabel` still could contain a duplicated entries
[100]="foo=1". But given the low likelihood of this issue and the size
of idxToLabel, it should be fine.
2024-09-30 14:24:59 +02:00
..
duration.go all: consistently use 'any' instead of 'interface{}' 2024-07-10 00:20:37 +02:00
duration_test.go all: consistently use 'any' instead of 'interface{}' 2024-07-10 00:20:37 +02:00
labels.go all: consistently use 'any' instead of 'interface{}' 2024-07-10 00:20:37 +02:00
labels_test.go lib/promutils: properly return error when incorrect Prometheus label names are passed to NewLabelsFromString() 2023-05-12 16:52:29 -07:00
labels_timing_test.go lib/promscrape: optimize service discovery speed 2022-11-29 21:26:00 -08:00
labelscompressor.go stream aggregation: fix possible duplicated aggregation results (#7118) 2024-09-30 14:24:59 +02:00
labelscompressor_test.go stream aggregation: fix possible duplicated aggregation results (#7118) 2024-09-30 14:24:59 +02:00
labelscompressor_timing_test.go lib/streamaggr: huge pile of changes 2024-03-02 02:42:50 +02:00
time.go app/vlinsert: support _time field without timezone information during data ingestion 2024-09-26 12:49:35 +02:00
time_test.go app/vlinsert: support _time field without timezone information during data ingestion 2024-09-26 12:49:35 +02:00