@@ -30,6 +30,7 @@ import (
3030 "github.com/pingcap/ticdc/pkg/config"
3131 "github.com/pingcap/ticdc/pkg/errors"
3232 "github.com/pingcap/ticdc/pkg/filter"
33+ "github.com/pingcap/ticdc/pkg/txnutil/gc"
3334 "github.com/pingcap/tidb/pkg/kv"
3435 "github.com/pingcap/tidb/pkg/meta/model"
3536 pd "github.com/tikv/pd/client"
@@ -127,7 +128,7 @@ func newPersistentStorage(
127128 pdCli pd.Client ,
128129 storage kv.Storage ,
129130) * persistentStorage {
130- gcSafePoint , err := pdCli . UpdateServiceGCSafePoint (ctx , "cdc-new-store" , 0 , 0 )
131+ gcSafePoint , err := gc . SetServiceGCSafepoint (ctx , pdCli , "cdc-new-store" , 0 , 0 )
131132 if err != nil {
132133 log .Panic ("get ts failed" , zap .Error (err ))
133134 }
@@ -210,7 +211,6 @@ func (p *persistentStorage) initializeFromKVStorage(dbPath string, storage kv.St
210211 log .Info ("schema store initialize from kv storage done" ,
211212 zap .Int ("databaseMapLen" , len (p .databaseMap )),
212213 zap .Int ("tableMapLen" , len (p .tableMap )),
213- zap .Int ("partitionMapLen" , len (p .partitionMap )),
214214 zap .Any ("duration(s)" , time .Since (now ).Seconds ()))
215215}
216216
@@ -507,7 +507,7 @@ func (p *persistentStorage) gc(ctx context.Context) error {
507507 case <- ctx .Done ():
508508 return nil
509509 case <- ticker .C :
510- gcSafePoint , err := p . pdCli . UpdateServiceGCSafePoint (ctx , "cdc-new-store" , 0 , 0 )
510+ gcSafePoint , err := gc . SetServiceGCSafepoint (ctx , p . pdCli , "cdc-new-store" , 0 , 0 )
511511 if err != nil {
512512 log .Warn ("get ts failed" , zap .Error (err ))
513513 continue
0 commit comments