From a20c6cb04b634508c34f5f60570084b91c69b022 Mon Sep 17 00:00:00 2001 From: vyzo Date: Thu, 17 Feb 2022 19:56:50 +0200 Subject: [PATCH 1/2] temporarily disable reification big reifications can use a lot of memory during sync apparently. --- blockstore/splitstore/splitstore_reify.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/blockstore/splitstore/splitstore_reify.go b/blockstore/splitstore/splitstore_reify.go index dc44ab21c06..6529007471d 100644 --- a/blockstore/splitstore/splitstore_reify.go +++ b/blockstore/splitstore/splitstore_reify.go @@ -10,7 +10,13 @@ import ( cid "github.com/ipfs/go-cid" ) +var EnableReification = false + func (s *SplitStore) reifyColdObject(c cid.Cid) { + if !EnableReification { + return + } + if !s.isWarm() { return } From 899a65ae870d84deff4ed06735808a0b26ad3fb1 Mon Sep 17 00:00:00 2001 From: vyzo Date: Thu, 17 Feb 2022 20:13:46 +0200 Subject: [PATCH 2/2] fix test --- blockstore/splitstore/splitstore_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/blockstore/splitstore/splitstore_test.go b/blockstore/splitstore/splitstore_test.go index 6b7e60e6c50..c7f9cb6fc2f 100644 --- a/blockstore/splitstore/splitstore_test.go +++ b/blockstore/splitstore/splitstore_test.go @@ -496,6 +496,7 @@ func testSplitStoreReification(t *testing.T, f func(context.Context, blockstore. } func TestSplitStoreReification(t *testing.T) { + EnableReification = true t.Log("test reification with Has") testSplitStoreReification(t, func(ctx context.Context, s blockstore.Blockstore, c cid.Cid) error { _, err := s.Has(ctx, c)