protect assignment of warmup epoch with the mutex
This commit is contained in:
parent
6cc2112749
commit
83c30dc4c0
@ -118,8 +118,8 @@ type SplitStore struct {
|
||||
cfg *Config
|
||||
|
||||
mx sync.Mutex
|
||||
baseEpoch abi.ChainEpoch
|
||||
warmupEpoch abi.ChainEpoch
|
||||
warmupEpoch abi.ChainEpoch // protected by mx
|
||||
baseEpoch abi.ChainEpoch // protected by compaction lock
|
||||
|
||||
coldPurgeSize int
|
||||
|
||||
@ -737,7 +737,9 @@ func (s *SplitStore) doWarmup(curTs *types.TipSet) error {
|
||||
if err != nil {
|
||||
return xerrors.Errorf("error saving warm up epoch: %w", err)
|
||||
}
|
||||
s.mx.Lock()
|
||||
s.warmupEpoch = epoch
|
||||
s.mx.Unlock()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user