diff --git a/blockstore/splitstore/markset_badger.go b/blockstore/splitstore/markset_badger.go index c7709967223..d2303dae25d 100644 --- a/blockstore/splitstore/markset_badger.go +++ b/blockstore/splitstore/markset_badger.go @@ -34,7 +34,7 @@ type BadgerMarkSet struct { var _ MarkSet = (*BadgerMarkSet)(nil) -var badgerMarkSetBatchSize = 65536 +var badgerMarkSetBatchSize = 16384 func NewBadgerMarkSetEnv(path string) (MarkSetEnv, error) { msPath := filepath.Join(path, "markset.badger") @@ -113,13 +113,13 @@ func (s *BadgerMarkSet) Mark(c cid.Cid) error { defer func() { s.mx.Lock() + defer s.mx.Unlock() delete(s.writing, seqno) s.writers-- if s.writers == 0 { s.cond.Broadcast() } - s.mx.Unlock() }() empty := []byte{} // not nil