From 04b370da00d7a9e34afa4d8931753b3b1849843d Mon Sep 17 00:00:00 2001 From: Ganesh Vernekar Date: Wed, 19 Oct 2022 15:21:29 +0530 Subject: [PATCH] Disable snapshot on shutdown if native histograms are enabled (#11473) Signed-off-by: Ganesh Vernekar --- cmd/prometheus/main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/prometheus/main.go b/cmd/prometheus/main.go index ff78702b7..bb592e207 100644 --- a/cmd/prometheus/main.go +++ b/cmd/prometheus/main.go @@ -208,6 +208,12 @@ func (c *flagConfig) setFeatureListOptions(logger log.Logger) error { } } } + + if c.tsdb.EnableNativeHistograms && c.tsdb.EnableMemorySnapshotOnShutdown { + c.tsdb.EnableMemorySnapshotOnShutdown = false + level.Warn(logger).Log("msg", "memory-snapshot-on-shutdown has been disabled automatically because memory-snapshot-on-shutdown and native-histograms cannot be enabled at the same time.") + } + return nil }