From 997c5b8bff66713792abafcbfad4dba641148f9f Mon Sep 17 00:00:00 2001 From: Arthur Schreiber Date: Mon, 7 Feb 2022 11:23:39 +0000 Subject: [PATCH] Reduce the minimal chunk size from `100` to `10`. --- go/base/context.go | 4 ++-- go/cmd/gh-ost/main.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go/base/context.go b/go/base/context.go index f8054d6..05728ef 100644 --- a/go/base/context.go +++ b/go/base/context.go @@ -551,8 +551,8 @@ func (this *MigrationContext) SetMaxLagMillisecondsThrottleThreshold(maxLagMilli } func (this *MigrationContext) SetChunkSize(chunkSize int64) { - if chunkSize < 100 { - chunkSize = 100 + if chunkSize < 10 { + chunkSize = 10 } if chunkSize > 100000 { chunkSize = 100000 diff --git a/go/cmd/gh-ost/main.go b/go/cmd/gh-ost/main.go index e1ed64a..c02d074 100644 --- a/go/cmd/gh-ost/main.go +++ b/go/cmd/gh-ost/main.go @@ -99,7 +99,7 @@ func main() { flag.BoolVar(&migrationContext.AssumeRBR, "assume-rbr", false, "set to 'true' when you know for certain your server uses 'ROW' binlog_format. gh-ost is unable to tell, event after reading binlog_format, whether the replication process does indeed use 'ROW', and restarts replication to be certain RBR setting is applied. Such operation requires SUPER privileges which you might not have. Setting this flag avoids restarting replication and you can proceed to use gh-ost without SUPER privileges") flag.BoolVar(&migrationContext.CutOverExponentialBackoff, "cut-over-exponential-backoff", false, "Wait exponentially longer intervals between failed cut-over attempts. Wait intervals obey a maximum configurable with 'exponential-backoff-max-interval').") exponentialBackoffMaxInterval := flag.Int64("exponential-backoff-max-interval", 64, "Maximum number of seconds to wait between attempts when performing various operations with exponential backoff.") - chunkSize := flag.Int64("chunk-size", 1000, "amount of rows to handle in each iteration (allowed range: 100-100,000)") + chunkSize := flag.Int64("chunk-size", 1000, "amount of rows to handle in each iteration (allowed range: 10-100,000)") dmlBatchSize := flag.Int64("dml-batch-size", 10, "batch size for DML events to apply in a single transaction (range 1-100)") defaultRetries := flag.Int64("default-retries", 60, "Default number of retries for various operations before panicking") cutOverLockTimeoutSeconds := flag.Int64("cut-over-lock-timeout-seconds", 3, "Max number of seconds to hold locks on tables while attempting to cut-over (retry attempted when lock exceeds timeout)")