Skip to content

Commit

Permalink
schema storage shallow copy DBInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
sdojjy committed Oct 19, 2021
1 parent 1588561 commit dbd34c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cdc/entry/schema_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ func (s *schemaSnapshot) Clone() *schemaSnapshot {

schemas := make(map[int64]*timodel.DBInfo, len(s.schemas))
for k, v := range s.schemas {
// DBInfo is readonly in TiCDC, shallow copy to reduce memory
schemas[k] = v.Copy()
}
clone.schemas = schemas
Expand Down

0 comments on commit dbd34c5

Please sign in to comment.