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
Wait for alertmanagers to complete state sync before becoming ACTIVE.
Note: Applies to sharding operation only.
When starting up, make sure that the initial state sync is completed for
any users which were initially assigned to the instance. This will reduce
the possibility that we lose state when [cleanly] scaling up or down, by
inadvertently losing the replica which we need to obtain state from.
This change allows the state sync to progress concurrently for all
tenants. The alternative would be to block for the service in `New()`,
which is a slightly simpler code change, but would mean that start-up
is potentially much slower.
Signed-off-by: Steve Simpson <[email protected]>
// Make sure that all the alertmanagers we were initially configured with have
482
+
// fetched state from the replicas, before advertising as ACTIVE and letting
483
+
// them shut-down. This will reduce the possibility that we lose state when
484
+
// scaling up or down.
485
+
iferr:=am.waitInitialStateSync(ctx); err!=nil {
486
+
returnerr
487
+
}
488
+
481
489
// With the initial sync now completed, we should have loaded all assigned alertmanager configurations to this instance. We can switch it to ACTIVE and start serving requests.
0 commit comments