From c6421f8a7549c9d40db6411a1dc36462c9932489 Mon Sep 17 00:00:00 2001 From: vyzo Date: Wed, 7 Jul 2021 21:27:36 +0300 Subject: [PATCH] don't nil the mark sets on close, it's dangerous. a concurrent marking can panic. --- blockstore/splitstore/markset_bloom.go | 6 ------ blockstore/splitstore/markset_map.go | 6 ------ 2 files changed, 12 deletions(-) diff --git a/blockstore/splitstore/markset_bloom.go b/blockstore/splitstore/markset_bloom.go index ca15da807..7676680fb 100644 --- a/blockstore/splitstore/markset_bloom.go +++ b/blockstore/splitstore/markset_bloom.go @@ -88,11 +88,5 @@ func (s *BloomMarkSet) Has(cid cid.Cid) (bool, error) { } func (s *BloomMarkSet) Close() error { - if s.ts { - s.mx.Lock() - defer s.mx.Unlock() - - } - s.bf = nil return nil } diff --git a/blockstore/splitstore/markset_map.go b/blockstore/splitstore/markset_map.go index f7baaaee6..5bac9a284 100644 --- a/blockstore/splitstore/markset_map.go +++ b/blockstore/splitstore/markset_map.go @@ -57,11 +57,5 @@ func (s *MapMarkSet) Has(cid cid.Cid) (bool, error) { } func (s *MapMarkSet) Close() error { - if s.ts { - s.mx.Lock() - defer s.mx.Unlock() - - } - s.set = nil return nil }