Skip to content

Commit

Permalink
changing conf.json back
Browse files Browse the repository at this point in the history
changes
  • Loading branch information
Manan007224 committed Jul 8, 2021
1 parent 9bf1bcc commit 031bd4c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
12 changes: 8 additions & 4 deletions examples/copydb/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@
},

"Databases": {
"Whitelist": ["benchmark"]
"Whitelist": ["abc"]
},

"Tables": {
"Blacklist": ["schema_migrations"]
},

"ForceIndexForVerification": {
"abc": {
"table1": "forced_index_name"
}
},

"DumpStateOnSignal": true,

"VerifierType": "ChecksumTable",
Expand All @@ -38,7 +44,5 @@
"Custom Script 2": ["examples/copydb/s2"]
},

"DumpStateToStdoutOnError": true,

"PeriodicallyVerifySchemaFingerPrintInterval": "1s"
"DumpStateToStdoutOnError": true
}
2 changes: 1 addition & 1 deletion ferry.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func (f *Ferry) NewSchemaFingerPrintVerifier() (*SchemaFingerPrintVerifier, erro
}
periodicallyVerifyInterval, err := time.ParseDuration(f.Config.PeriodicallyVerifySchemaFingerPrintInterval)
if err != nil {
return nil, fmt.Errorf("invalid MaxExpectedDowntime: %v. this error should have been caught via .Validate()", err)
return nil, fmt.Errorf("invalid PeriodicallyVerifySchemaFingerPrintInterval: %v. this error should have been caught via .Validate()", err)
}

return &SchemaFingerPrintVerifier{
Expand Down
19 changes: 9 additions & 10 deletions inline_verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,14 @@ func (s *BinlogVerifyStore) Serialize() BinlogVerifySerializedStore {
}

type InlineVerifier struct {
SourceDB *sql.DB
TargetDB *sql.DB
DatabaseRewrites map[string]string
TableRewrites map[string]string
TableSchemaCache TableSchemaCache
BatchSize int
VerifyBinlogEventsInterval time.Duration
VerifiySchemaFingerPrintInterval time.Duration
MaxExpectedDowntime time.Duration
SourceDB *sql.DB
TargetDB *sql.DB
DatabaseRewrites map[string]string
TableRewrites map[string]string
TableSchemaCache TableSchemaCache
BatchSize int
VerifyBinlogEventsInterval time.Duration
MaxExpectedDowntime time.Duration

StateTracker *StateTracker
ErrorHandler ErrorHandler
Expand Down Expand Up @@ -369,7 +368,6 @@ func (v *InlineVerifier) CheckFingerprintInline(tx *sql.Tx, targetSchema, target
func (v *InlineVerifier) PeriodicallyVerifyBinlogEvents(ctx context.Context) {
v.logger.Info("starting periodic reverifier")
ticker := time.NewTicker(v.VerifyBinlogEventsInterval)

defer ticker.Stop()

for {
Expand All @@ -390,6 +388,7 @@ func (v *InlineVerifier) PeriodicallyVerifyBinlogEvents(ctx context.Context) {
return
}
}

}

func (v *InlineVerifier) VerifyBeforeCutover() error {
Expand Down

0 comments on commit 031bd4c

Please sign in to comment.