From b548a6a172e843664240a3b594d7510d8dbd91a5 Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Wed, 27 Jul 2016 10:45:22 +0200 Subject: [PATCH] adding human friendly hint re: throttling and binary logs --- go/logic/migrator.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/go/logic/migrator.go b/go/logic/migrator.go index 62a86766b..310331e36 100644 --- a/go/logic/migrator.go +++ b/go/logic/migrator.go @@ -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": { @@ -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": @@ -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": {