@@ -47,6 +47,7 @@ var defaultReplicaConfig = &ReplicaConfig{
4747 MemoryQuota : util .AddressOf (uint64 (DefaultChangefeedMemoryQuota )),
4848 CaseSensitive : util .AddressOf (false ),
4949 CheckGCSafePoint : util .AddressOf (true ),
50+ EnableRedoIOCheck : util .AddressOf (true ),
5051 EnableSyncPoint : util .AddressOf (false ),
5152 EnableTableMonitor : util .AddressOf (false ),
5253 SyncPointInterval : util .AddressOf (10 * time .Minute ),
@@ -146,6 +147,9 @@ type replicaConfig struct {
146147 CaseSensitive * bool `toml:"case-sensitive" json:"case-sensitive,omitempty"`
147148 ForceReplicate * bool `toml:"force-replicate" json:"force-replicate,omitempty"`
148149 CheckGCSafePoint * bool `toml:"check-gc-safe-point" json:"check-gc-safe-point,omitempty"`
150+ // EnableRedoIOCheck controls whether consistency storage validation should
151+ // perform an I/O accessibility check. This field is internal only.
152+ EnableRedoIOCheck * bool `toml:"-" json:"-"`
149153 // EnableSyncPoint is only available when the downstream is a Database.
150154 EnableSyncPoint * bool `toml:"enable-sync-point" json:"enable-sync-point,omitempty"`
151155 EnableTableMonitor * bool `toml:"enable-table-monitor" json:"enable-table-monitor"`
@@ -250,6 +254,9 @@ func (c *ReplicaConfig) Clone() *ReplicaConfig {
250254 log .Panic ("failed to unmarshal replica config" ,
251255 zap .Error (cerror .WrapError (cerror .ErrDecodeFailed , err )))
252256 }
257+ if c .EnableRedoIOCheck != nil {
258+ clone .EnableRedoIOCheck = util .AddressOf (* c .EnableRedoIOCheck )
259+ }
253260 return clone
254261}
255262
@@ -267,6 +274,11 @@ func (c *replicaConfig) fillFromV1(v1 *outdated.ReplicaConfigV1) {
267274
268275// ValidateAndAdjust verifies and adjusts the replica configuration.
269276func (c * ReplicaConfig ) ValidateAndAdjust (sinkURI * url.URL ) error { // check sink uri
277+ enableRedoIOCheck := true
278+ if c .EnableRedoIOCheck != nil {
279+ enableRedoIOCheck = * c .EnableRedoIOCheck
280+ }
281+
270282 if c .Sink != nil {
271283 err := c .Sink .validateAndAdjust (sinkURI )
272284 if err != nil {
@@ -275,7 +287,7 @@ func (c *ReplicaConfig) ValidateAndAdjust(sinkURI *url.URL) error { // check sin
275287 }
276288
277289 if c .Consistent != nil {
278- err := c .Consistent .ValidateAndAdjust ( )
290+ err := c .Consistent .validateAndAdjust ( enableRedoIOCheck )
279291 if err != nil {
280292 return err
281293 }
0 commit comments