From 32318e50eb4322641bd77ed2d3d51ef98a822f7a Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Tue, 17 Dec 2024 18:52:51 +0800 Subject: [PATCH] snapshot(ticdc): fix ddl puller and ddl manager stuck caused by dead lock (#11886) (#11887) close pingcap/tiflow#11884 --- cdc/entry/schema/snapshot.go | 3 --- cdc/entry/schema_storage.go | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/cdc/entry/schema/snapshot.go b/cdc/entry/schema/snapshot.go index 46d8daddf2e..b96ea1ea7c6 100644 --- a/cdc/entry/schema/snapshot.go +++ b/cdc/entry/schema/snapshot.go @@ -561,9 +561,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 53375475215..86dde5f1141 100644 --- a/cdc/entry/schema_storage.go +++ b/cdc/entry/schema_storage.go @@ -272,8 +272,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 }