Skip to content

Commit b548a6a

Browse files
author
Shlomi Noach
committed
adding human friendly hint re: throttling and binary logs
1 parent dbcc0e0 commit b548a6a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

go/logic/migrator.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,8 @@ func (this *Migrator) onServerCommand(command string, writer *bufio.Writer) (err
654654
arg = strings.TrimSpace(tokens[1])
655655
}
656656

657+
throttleHint := "# Note: you may only throttle for as long as your binary logs are not purged\n"
658+
657659
switch command {
658660
case "help":
659661
{
@@ -730,6 +732,7 @@ help # This message
730732
case "throttle-query":
731733
{
732734
this.migrationContext.SetThrottleQuery(arg)
735+
fmt.Fprintf(writer, throttleHint)
733736
this.printStatus(ForcePrintStatusAndHint, writer)
734737
}
735738
case "throttle-control-replicas":
@@ -744,6 +747,8 @@ help # This message
744747
case "throttle", "pause", "suspend":
745748
{
746749
atomic.StoreInt64(&this.migrationContext.ThrottleCommandedByUser, 1)
750+
fmt.Fprintf(writer, throttleHint)
751+
this.printStatus(ForcePrintStatusAndHint, writer)
747752
}
748753
case "no-throttle", "unthrottle", "resume", "continue":
749754
{

0 commit comments

Comments
 (0)