You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Mark ourselved as Leaving so no more samples are send to us.
659
-
err:=i.changeState(context.Background(), LEAVING)
660
-
iferr!=nil {
661
-
level.Error(i.logger).Log("msg", "failed to set state to LEAVING", "ring", i.RingName, "err", err)
658
+
// We dont need to mark us as leaving if READONLY. There is not request sent to us.
659
+
// Also important to avoid this change so we dont have resharding(for querier) happen when READONLY restart as we extended shard on READONLY but not on LEAVING
660
+
// Query also keeps calling pods on LEAVING or JOINING not causing any difference if left on READONLY
661
+
ifi.GetState() !=READONLY {
662
+
// Mark ourselved as Leaving so no more samples are send to us.
663
+
err:=i.changeState(context.Background(), LEAVING)
664
+
iferr!=nil {
665
+
level.Error(i.logger).Log("msg", "failed to set state to LEAVING", "ring", i.RingName, "err", err)
666
+
}
662
667
}
663
668
664
669
// Do the transferring / flushing on a background goroutine so we can continue
0 commit comments