From 3703b18c6da785d57236a1452eed43759e51b411 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Tue, 17 Dec 2024 12:28:06 +0800 Subject: [PATCH] snapshot(ticdc): fix ddl puller and ddl manager stuck caused by dead lock (#11886) (#11888) 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 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 }