diff --git a/cdc/owner/changefeed.go b/cdc/owner/changefeed.go index f01c394c79d..e79b39421fa 100644 --- a/cdc/owner/changefeed.go +++ b/cdc/owner/changefeed.go @@ -593,7 +593,7 @@ LOOP2: }() } - c.redoMetaMgr = redo.NewMetaManager(c.id, contextutil.CaptureAddrFromCtx(ctx), c.state.Info.Config.Consistent, checkpointTs) + c.redoMetaMgr = redo.NewMetaManager(c.id, c.state.Info.Config.Consistent, checkpointTs) if c.redoMetaMgr.Enabled() { c.wg.Add(1) go func() { @@ -760,7 +760,7 @@ func (c *changefeed) cleanupRedoManager(ctx context.Context) { } // when removing a paused changefeed, the redo manager is nil, create a new one if c.redoMetaMgr == nil { - c.redoMetaMgr = redo.NewMetaManager(c.id, contextutil.CaptureAddrFromCtx(ctx), c.state.Info.Config.Consistent, 0) + c.redoMetaMgr = redo.NewMetaManager(c.id, c.state.Info.Config.Consistent, 0) } err := c.redoMetaMgr.Cleanup(ctx) if err != nil { diff --git a/cdc/redo/meta_manager.go b/cdc/redo/meta_manager.go index 6e29bc86425..a19086b9bd0 100644 --- a/cdc/redo/meta_manager.go +++ b/cdc/redo/meta_manager.go @@ -85,7 +85,7 @@ func NewDisabledMetaManager() *metaManager { // NewMetaManager creates a new meta Manager. func NewMetaManager( - changefeedID model.ChangeFeedID, captureID string, + changefeedID model.ChangeFeedID, cfg *config.ConsistentConfig, checkpoint model.Ts, ) *metaManager { // return a disabled Manager if no consistent config or normal consistent level @@ -94,7 +94,7 @@ func NewMetaManager( } m := &metaManager{ - captureID: captureID, + captureID: config.GetGlobalServerConfig().AdvertiseAddr, changeFeedID: changefeedID, uuidGenerator: uuid.NewGenerator(), enabled: true, @@ -123,7 +123,6 @@ func (m *metaManager) preStart(ctx context.Context) error { } // "nfs" and "local" scheme are converted to "file" scheme redo.FixLocalScheme(uri) - extStorage, err := redo.InitExternalStorage(ctx, *uri) if err != nil { return err @@ -164,7 +163,6 @@ func (m *metaManager) Run(ctx context.Context, _ ...chan<- error) error { eg.Go(func() error { return m.bgGC(egCtx) }) - m.running.Store(true) return eg.Wait() }