From a46a3f46a26c470a4b92df023e5f33cb1bca1fb7 Mon Sep 17 00:00:00 2001 From: Abdulsametileri Date: Thu, 2 Nov 2023 10:48:59 +0300 Subject: [PATCH] feat: check if failovertimer already initialized --- couchbase/rollback_mitigation.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/couchbase/rollback_mitigation.go b/couchbase/rollback_mitigation.go index 64e1722..09fe2b5 100644 --- a/couchbase/rollback_mitigation.go +++ b/couchbase/rollback_mitigation.go @@ -220,6 +220,10 @@ func (r *rollbackMitigation) startObserve(groupID int) { } func (r *rollbackMitigation) observeVbUUIDMap() { + if r.failOverUUIDTimer != nil { + return + } + r.failOverUUIDTimer = time.NewTicker(time.Minute) for range r.failOverUUIDTimer.C { r.LoadVbUUIDMap()