prometheus/util/logging
TJ Hoplock 03f2a65bc8 fix(deduper): use ptr to sync.RWMutex, fix panic during concurrent use
Resolves: #15559

As accurately noted in the issue description, the map is shared among
child loggers that get created when `WithAttr()`/`WithGroup()` are
called on the underlying handler, which happens via `log.With()` and
`log.WithGroup()` respectively.

The RW mutex was a value in the previous implementation that used
go-kit/log, and I should've updated it to use a pointer when I converted
the deduper.

Also adds a test.

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
2024-12-19 17:36:24 -05:00
..
dedupe.go fix(deduper): use ptr to sync.RWMutex, fix panic during concurrent use 2024-12-19 17:36:24 -05:00
dedupe_test.go fix(deduper): use ptr to sync.RWMutex, fix panic during concurrent use 2024-12-19 17:36:24 -05:00
file.go fix!: stop unbounded memory usage from query log 2024-11-23 14:20:37 -05:00
file_test.go fix!: stop unbounded memory usage from query log 2024-11-23 14:20:37 -05:00