Skip to content

Commit

Permalink
Merge pull request #337 from github/start-slave-wait
Browse files Browse the repository at this point in the history
sleeping 500ms after 'START SLAVE'
  • Loading branch information
Shlomi Noach authored Dec 15, 2016
2 parents 038083e + a147b32 commit 863f508
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions go/logic/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -258,6 +260,8 @@ func (this *Inspector) restartReplication() error {
if startError != nil {
return startError
}
time.Sleep(startSlavePostWaitMilliseconds)

log.Debugf("Replication restarted")
return nil
}
Expand Down

0 comments on commit 863f508

Please sign in to comment.