mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
tsdb: align atomically accessed int64 (#9192)
This prevents a panic in 32-bit archs: https://pkg.go.dev/sync/atomic#pkg-note-BUG Fixed #9190 Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
parent
a3e22d8b3f
commit
2d2aba4e8d
|
@ -117,6 +117,10 @@ type Head struct {
|
||||||
|
|
||||||
// HeadOptions are parameters for the Head block.
|
// HeadOptions are parameters for the Head block.
|
||||||
type HeadOptions struct {
|
type HeadOptions struct {
|
||||||
|
// Runtime reloadable option. At the top of the struct for 32 bit OS:
|
||||||
|
// https://pkg.go.dev/sync/atomic#pkg-note-BUG
|
||||||
|
MaxExemplars atomic.Int64
|
||||||
|
|
||||||
ChunkRange int64
|
ChunkRange int64
|
||||||
// ChunkDirRoot is the parent directory of the chunks directory.
|
// ChunkDirRoot is the parent directory of the chunks directory.
|
||||||
ChunkDirRoot string
|
ChunkDirRoot string
|
||||||
|
@ -128,9 +132,6 @@ type HeadOptions struct {
|
||||||
StripeSize int
|
StripeSize int
|
||||||
SeriesCallback SeriesLifecycleCallback
|
SeriesCallback SeriesLifecycleCallback
|
||||||
EnableExemplarStorage bool
|
EnableExemplarStorage bool
|
||||||
|
|
||||||
// Runtime reloadable options.
|
|
||||||
MaxExemplars atomic.Int64
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func DefaultHeadOptions() *HeadOptions {
|
func DefaultHeadOptions() *HeadOptions {
|
||||||
|
|
Loading…
Reference in a new issue