diff --git a/cdc/entry/schema/snapshot.go b/cdc/entry/schema/snapshot.go index 0e1971e8c64..b188ffcf5a7 100644 --- a/cdc/entry/schema/snapshot.go +++ b/cdc/entry/schema/snapshot.go @@ -570,9 +570,6 @@ func (s *Snapshot) SchemaCount() (count int) { // DumpToString dumps the snapshot to a string. func (s *Snapshot) DumpToString() string { - s.rwlock.RLock() - defer s.rwlock.RUnlock() - schemas := make([]string, 0, s.inner.schemas.Len()) s.IterSchemas(func(dbInfo *timodel.DBInfo) { schemas = append(schemas, fmt.Sprintf("%v", dbInfo)) diff --git a/cdc/entry/schema_storage.go b/cdc/entry/schema_storage.go index 207c4c011cd..5704eb6393e 100644 --- a/cdc/entry/schema_storage.go +++ b/cdc/entry/schema_storage.go @@ -273,8 +273,7 @@ func (s *schemaStorage) AllPhysicalTables(ctx context.Context, ts model.Ts) ([]m log.Debug("get new schema snapshot", zap.Uint64("ts", ts), zap.Uint64("snapTs", snap.CurrentTs()), - zap.Any("tables", res), - zap.String("snapshot", snap.DumpToString())) + zap.Any("tables", res)) return res, nil }