mirror of
https://github.com/prometheus/prometheus.git
synced 2025-08-05 21:57:09 +02:00
Revert the option regardless of error
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
This commit is contained in:
parent
d8e1b6bdfd
commit
0300ad58a9
@ -630,8 +630,8 @@ func (h *Head) Init(minValidTime int64) (err error) {
|
|||||||
if h.opts.EnableSharding {
|
if h.opts.EnableSharding {
|
||||||
h.opts.EnableSharding = false
|
h.opts.EnableSharding = false
|
||||||
defer func() {
|
defer func() {
|
||||||
|
h.opts.EnableSharding = true
|
||||||
if err == nil {
|
if err == nil {
|
||||||
h.opts.EnableSharding = true
|
|
||||||
// No locking is needed here as nobody should be writing while we're in Init.
|
// No locking is needed here as nobody should be writing while we're in Init.
|
||||||
for _, stripe := range h.series.series {
|
for _, stripe := range h.series.series {
|
||||||
for _, s := range stripe {
|
for _, s := range stripe {
|
||||||
|
Loading…
Reference in New Issue
Block a user