While investigating lock contention on `MemPostings`, we saw that lots of locking is happening in `LabelValues` and `PostingsForLabelsMatching`, both copying the label values slices while holding the mutex. This adds an extra map that holds an append-only label values slice for each one of the label names. Since the slice is append-only, it can be copied without holding the mutex. Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com> |
||
|---|---|---|
| .. | ||
| index.go | ||
| index_test.go | ||
| postings.go | ||
| postings_test.go | ||
| postingsstats.go | ||
| postingsstats_test.go | ||