Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#52301
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
hawkingrei committed Aug 27, 2024
1 parent e0cf097 commit 0821927
Show file tree
Hide file tree
Showing 5 changed files with 1,069 additions and 2 deletions.
23 changes: 23 additions & 0 deletions parser/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -1707,9 +1707,32 @@ func (cis *CIStr) MemoryUsage() (sum int64) {

// TableItemID is composed by table ID and column/index ID
type TableItemID struct {
<<<<<<< HEAD:parser/model/model.go
TableID int64
ID int64
IsIndex bool
=======
TableID int64
ID int64
IsIndex bool
IsSyncLoadFailed bool
}

// Key is used to generate unique key for TableItemID to use in the syncload
func (t TableItemID) Key() string {
return fmt.Sprintf("%d#%d#%t", t.ID, t.TableID, t.IsIndex)
}

// StatsLoadItem represents the load unit for statistics's memory loading.
type StatsLoadItem struct {
TableItemID
FullLoad bool
>>>>>>> 3ba874c77f5 (statistics: fix wrong singleflight implementation for stats' syncload (#52301)):pkg/parser/model/model.go
}

// Key is used to generate unique key for TableItemID to use in the syncload
func (s StatsLoadItem) Key() string {
return fmt.Sprintf("%s#%t", s.TableItemID.Key(), s.FullLoad)
}

// PolicyRefInfo is the struct to refer the placement policy.
Expand Down
Loading

0 comments on commit 0821927

Please sign in to comment.