Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <[email protected]>
  • Loading branch information
hawkingrei committed Apr 22, 2024
1 parent 3e2d5f9 commit a5ca967
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/statistics/handle/syncload/stats_syncload.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ func (s *statsSyncLoad) SendLoadRequests(sc *stmtctx.StatementContext, neededHis
timer := time.NewTimer(timeout)
defer timer.Stop()
for _, item := range remainedItems {
resultCh := globalStatsSyncLoadSingleFlight.DoChan(item.Key(), func() (any, error) {
localItem := item
resultCh := globalStatsSyncLoadSingleFlight.DoChan(localItem.Key(), func() (any, error) {
task := &statstypes.NeededItemTask{
Item: item,
Item: localItem,
ToTimeout: time.Now().Local().Add(timeout),
ResultCh: make(chan stmtctx.StatsLoadResult),
}
Expand Down

0 comments on commit a5ca967

Please sign in to comment.