mirror of https://github.com/hashicorp/consul
Fix replication metrics on replication.go also
parent
d6e0bffbce
commit
74a6463761
|
@ -153,6 +153,12 @@ func (r *Replicator) Run(ctx context.Context) error {
|
|||
// Perform a single round of replication
|
||||
index, exit, err := r.delegate.Replicate(ctx, atomic.LoadUint64(&r.lastRemoteIndex), r.logger)
|
||||
if exit {
|
||||
metrics.SetGauge([]string{"leader", "replication", r.delegate.MetricName(), "status"},
|
||||
0,
|
||||
)
|
||||
metrics.SetGauge([]string{"leader", "replication", r.delegate.MetricName(), "index"},
|
||||
0,
|
||||
)
|
||||
return nil
|
||||
}
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue