Skip to content

Commit f7c31b9

Browse files
committed
This is an automated cherry-pick of pingcap#52301
Signed-off-by: ti-chi-bot <[email protected]>
1 parent 5009883 commit f7c31b9

File tree

5 files changed

+1069
-2
lines changed

5 files changed

+1069
-2
lines changed

parser/model/model.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,9 +1707,32 @@ func (cis *CIStr) MemoryUsage() (sum int64) {
17071707

17081708
// TableItemID is composed by table ID and column/index ID
17091709
type TableItemID struct {
1710+
<<<<<<< HEAD:parser/model/model.go
17101711
TableID int64
17111712
ID int64
17121713
IsIndex bool
1714+
=======
1715+
TableID int64
1716+
ID int64
1717+
IsIndex bool
1718+
IsSyncLoadFailed bool
1719+
}
1720+
1721+
// Key is used to generate unique key for TableItemID to use in the syncload
1722+
func (t TableItemID) Key() string {
1723+
return fmt.Sprintf("%d#%d#%t", t.ID, t.TableID, t.IsIndex)
1724+
}
1725+
1726+
// StatsLoadItem represents the load unit for statistics's memory loading.
1727+
type StatsLoadItem struct {
1728+
TableItemID
1729+
FullLoad bool
1730+
>>>>>>> 3ba874c77f5 (statistics: fix wrong singleflight implementation for stats' syncload (#52301)):pkg/parser/model/model.go
1731+
}
1732+
1733+
// Key is used to generate unique key for TableItemID to use in the syncload
1734+
func (s StatsLoadItem) Key() string {
1735+
return fmt.Sprintf("%s#%t", s.TableItemID.Key(), s.FullLoad)
17131736
}
17141737

17151738
// PolicyRefInfo is the struct to refer the placement policy.

0 commit comments

Comments
 (0)