Commit graph

6 commits

Author SHA1 Message Date
Bryan Boreham 4ced6d5f40 compactor: avoid memory blow-up with stringlabels
When compiled with `-tags stringlabels`, the names and values point into
a larger block of memory containing all labels. Garbage-collection
considers the entire block "live" if you point to a part of it, so the
map ends up retaining all labels for (nearly) all series.

Cloning the string value avoids this problem, and we check first if the
value is already in the map. Since the clone is more expensive, only do
it when built with `-tags stringlabels`.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-07-29 10:20:25 +01:00
György Krajcsovits 87c727e957 Fix linter errors in Grafana additions
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-04-28 16:32:42 +02:00
Peter Štibraný cc9bc8fe9f
Introduced some options for compactor concurrency (#66)
* Tool for CLI compactions.
* Use concurrency when populating symbols for multiple blocks.
* Use concurrency when writing to multiple output blocks.

Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
2021-12-02 10:34:52 +01:00
Marco Pracucci 56f926c62c
Fixed linter issues
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2021-11-03 10:35:29 +01:00
Peter Štibraný b7b70066ae Address review feedback. 2021-10-06 11:04:37 +02:00
Peter Štibraný 259e09fe5f When doing compaction with splitting, only use symbols from series that belong to given sharded block. 2021-10-05 16:06:38 +02:00