File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -424,6 +424,7 @@ func (c *Canal) prepareSyncer() error {
424
424
ParseTime : c .cfg .ParseTime ,
425
425
SemiSyncEnabled : c .cfg .SemiSyncEnabled ,
426
426
MaxReconnectAttempts : c .cfg .MaxReconnectAttempts ,
427
+ DisableRetrySync : c .cfg .DisableRetrySync ,
427
428
TimestampStringLocation : c .cfg .TimestampStringLocation ,
428
429
TLSConfig : c .cfg .TLSConfig ,
429
430
}
Original file line number Diff line number Diff line change @@ -77,10 +77,13 @@ type Config struct {
77
77
// SemiSyncEnabled enables semi-sync or not.
78
78
SemiSyncEnabled bool `toml:"semi_sync_enabled"`
79
79
80
- // Set to change the maximum number of attempts to re-establish a broken
81
- // connection
80
+ // maximum number of attempts to re-establish a broken connection, zero or negative number means infinite retry.
81
+ // this configuration will not work if DisableRetrySync is true
82
82
MaxReconnectAttempts int `toml:"max_reconnect_attempts"`
83
83
84
+ // whether disable re-sync for broken connection
85
+ DisableRetrySync bool `toml:"disable_retry_sync"`
86
+
84
87
// Set TLS config
85
88
TLSConfig * tls.Config
86
89
}
You can’t perform that action at this time.
0 commit comments