You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: go/base/context.go
+34-1Lines changed: 34 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,10 @@ import (
25
25
"github.com/github/gh-ost/go/metrics"
26
26
"github.com/github/gh-ost/go/mysql"
27
27
"github.com/github/gh-ost/go/sql"
28
-
"github.com/openark/golib/log"
29
28
30
29
"github.com/go-ini/ini"
30
+
"github.com/openark/golib/log"
31
+
"github.com/pingcap/failpoint"
31
32
)
32
33
33
34
// RowsEstimateMethod is the type of row number estimation
@@ -451,6 +452,8 @@ type MigrationContext struct {
451
452
DrainGTID mysql.BinlogCoordinates// Source @@gtid_executed captured immediately after the source RENAME TABLE; the applier drains until it reaches this coordinate (move-tables only).
Copy file name to clipboardExpand all lines: go/cmd/gh-ost/main.go
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -197,6 +197,9 @@ func main() {
197
197
flag.StringVar(&migrationContext.MoveTables.TargetDatabase, "target-database", "", "Target MySQL database name for --move-tables mode. If not provided, uses the same database name as the source connection")
198
198
flag.BoolVar(&migrationContext.MoveTables.AllowOnSourcePrimary, "allow-on-source-primary", false, "allow --move-tables to read (schema, row copy, binlog) from the source cluster's primary. By default gh-ost stops if --host is the primary; prefer pointing --host at a replica to spare the primary the copy load.")
199
199
200
+
// unsafe fail points, for integration testing purposes
201
+
flag.BoolVar(&migrationContext.UnsafeFailPointsEnabled, "unsafe-fail-points-enabled", false, "UNSAFE: Enable fail points for integration testing purposes. Do not use in production.")
202
+
200
203
flag.CommandLine.SetOutput(os.Stdout)
201
204
flag.Parse()
202
205
cutOverLockTimeoutUserSpecified:=false
@@ -345,7 +348,9 @@ func main() {
345
348
if*storageEngine=="rocksdb" {
346
349
migrationContext.Log.Warning("RocksDB storage engine support is experimental")
347
350
}
348
-
ifmigrationContext.CheckpointIntervalSeconds<10 {
351
+
// ignore low checkpoint intervals in unsafe mode as frequent checkpoints are required to reliably
0 commit comments