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) (#11889)

close #11884
  • Loading branch information
ti-chi-bot authored Dec 17, 2024
1 parent 9d7482a commit 0c88977
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 @@ -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))
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 @@ -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
}
Expand Down

0 comments on commit 0c88977

Please sign in to comment.