diff --git a/cdc/owner/changefeed_test.go b/cdc/owner/changefeed_test.go index ffb4725f0c5..8c9f9ddf8f3 100644 --- a/cdc/owner/changefeed_test.go +++ b/cdc/owner/changefeed_test.go @@ -537,9 +537,10 @@ func TestRemoveChangefeed(t *testing.T) { dir := t.TempDir() info.SinkURI = "mysql://" info.Config.Consistent = &config.ConsistentConfig{ - Level: "eventual", - Storage: filepath.Join("nfs://", dir), - FlushIntervalInMs: redo.DefaultFlushIntervalInMs, + Level: "eventual", + Storage: filepath.Join("nfs://", dir), + FlushIntervalInMs: redo.DefaultFlushIntervalInMs, + MetaFlushIntervalInMs: redo.DefaultMetaFlushIntervalInMs, } ctx = cdcContext.WithChangefeedVars(ctx, &cdcContext.ChangefeedVars{ ID: ctx.ChangefeedVars().ID, diff --git a/cdc/redo/meta_manager.go b/cdc/redo/meta_manager.go index 1809fc2795f..17709f57d32 100644 --- a/cdc/redo/meta_manager.go +++ b/cdc/redo/meta_manager.go @@ -126,7 +126,9 @@ func NewMetaManager(ctx context.Context, changefeedID model.ChangeFeedID, } if m.flushIntervalInMs < redo.MinFlushIntervalInMs { - log.Panic("redo meta flush interval is too small") + log.Warn("redo flush interval is too small, use default value", + zap.Int64("interval", m.flushIntervalInMs)) + m.flushIntervalInMs = redo.DefaultMetaFlushIntervalInMs } uri, err := storage.ParseRawURL(cfg.Storage) diff --git a/pkg/config/config_test_data.go b/pkg/config/config_test_data.go index 18d803b30f6..6480713a48c 100644 --- a/pkg/config/config_test_data.go +++ b/pkg/config/config_test_data.go @@ -70,6 +70,7 @@ const ( "level": "none", "max-log-size": 64, "flush-interval": 2000, + "meta-flush-interval": 200, "storage": "", "use-file-backend": false }, @@ -303,6 +304,7 @@ const ( "level": "none", "max-log-size": 64, "flush-interval": 2000, + "meta-flush-interval": 200, "storage": "", "use-file-backend": false }, @@ -450,6 +452,7 @@ const ( "level": "none", "max-log-size": 64, "flush-interval": 2000, + "meta-flush-interval": 200, "storage": "", "use-file-backend": false },