Skip to content

Commit

Permalink
adding human friendly hint re: throttling and binary logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Shlomi Noach committed Jul 27, 2016
1 parent dbcc0e0 commit b548a6a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions go/logic/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,8 @@ func (this *Migrator) onServerCommand(command string, writer *bufio.Writer) (err
arg = strings.TrimSpace(tokens[1])
}

throttleHint := "# Note: you may only throttle for as long as your binary logs are not purged\n"

switch command {
case "help":
{
Expand Down Expand Up @@ -730,6 +732,7 @@ help # This message
case "throttle-query":
{
this.migrationContext.SetThrottleQuery(arg)
fmt.Fprintf(writer, throttleHint)
this.printStatus(ForcePrintStatusAndHint, writer)
}
case "throttle-control-replicas":
Expand All @@ -744,6 +747,8 @@ help # This message
case "throttle", "pause", "suspend":
{
atomic.StoreInt64(&this.migrationContext.ThrottleCommandedByUser, 1)
fmt.Fprintf(writer, throttleHint)
this.printStatus(ForcePrintStatusAndHint, writer)
}
case "no-throttle", "unthrottle", "resume", "continue":
{
Expand Down

0 comments on commit b548a6a

Please sign in to comment.