Skip to content

Commit

Permalink
protect stats hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
max-hoffman committed Sep 10, 2024
1 parent c4bf019 commit ff4fe7b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions go/libraries/doltcore/sqle/statspro/dolt_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ func (s *DoltStats) Clone(_ context.Context) sql.JSONWrapper {

var _ sql.Statistic = (*DoltStats)(nil)

func (s *DoltStats) SetChunks(h []hash.Hash) sql.Statistic {
s.mu.Lock()
defer s.mu.Unlock()
s.Chunks = h
}

func (s *DoltStats) WithColSet(set sql.ColSet) sql.Statistic {
ret := *s
ret.Statistic = ret.Statistic.WithColSet(set).(*stats.Statistic)
Expand Down

0 comments on commit ff4fe7b

Please sign in to comment.