From d12c0265b07fb5f7740b1da7fea4d3b0eee2713e Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Tue, 13 Dec 2016 12:27:20 +0100 Subject: [PATCH] sleeping 500ms after 'START SLAVE' --- go/logic/inspect.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/go/logic/inspect.go b/go/logic/inspect.go index cd47c78..19db8a3 100644 --- a/go/logic/inspect.go +++ b/go/logic/inspect.go @@ -21,6 +21,8 @@ import ( "github.com/outbrain/golib/sqlutils" ) +const startSlavePostWaitMilliseconds = 500 * time.Millisecond + // Inspector reads data from the read-MySQL-server (typically a replica, but can be the master) // It is used for gaining initial status and structure, and later also follow up on progress and changelog type Inspector struct { @@ -258,6 +260,8 @@ func (this *Inspector) restartReplication() error { if startError != nil { return startError } + time.Sleep(startSlavePostWaitMilliseconds) + log.Debugf("Replication restarted") return nil }