Skip to content

Commit d12c026

Browse files
author
Shlomi Noach
committed
sleeping 500ms after 'START SLAVE'
1 parent 35ace62 commit d12c026

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

go/logic/inspect.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import (
2121
"github.com/outbrain/golib/sqlutils"
2222
)
2323

24+
const startSlavePostWaitMilliseconds = 500 * time.Millisecond
25+
2426
// Inspector reads data from the read-MySQL-server (typically a replica, but can be the master)
2527
// It is used for gaining initial status and structure, and later also follow up on progress and changelog
2628
type Inspector struct {
@@ -258,6 +260,8 @@ func (this *Inspector) restartReplication() error {
258260
if startError != nil {
259261
return startError
260262
}
263+
time.Sleep(startSlavePostWaitMilliseconds)
264+
261265
log.Debugf("Replication restarted")
262266
return nil
263267
}

0 commit comments

Comments
 (0)