Skip to content

Commit

Permalink
snapshot(ticdc): fix ddl puller and ddl manager stuck caused by dead …
Browse files Browse the repository at this point in the history
…lock (#11886) (#11888)

close #11884
  • Loading branch information
ti-chi-bot authored Dec 17, 2024
1 parent d8f0a6e commit 3703b18
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions cdc/entry/schema/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 1 addition & 2 deletions cdc/entry/schema_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 3703b18

Please sign in to comment.