From 57fa8a867f4cd43083d50e56762b639cd00e00c5 Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Tue, 3 Apr 2018 16:00:06 +0200 Subject: [PATCH] swarm/storage: comment out collectGarbage --- swarm/storage/ldbstore.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/swarm/storage/ldbstore.go b/swarm/storage/ldbstore.go index d0a76b440a..90db493a64 100644 --- a/swarm/storage/ldbstore.go +++ b/swarm/storage/ldbstore.go @@ -619,10 +619,10 @@ func (s *LDBStore) writeBatches() { log.Error(fmt.Sprintf("DbStore: spawn batch write (%d chunks): %v", b.Len(), err)) } close(c) - if e >= s.capacity { - log.Trace(fmt.Sprintf("DbStore: collecting garbage...(%d chunks)", e)) - s.collectGarbage(gcArrayFreeRatio) - } + //if e >= s.capacity { + //log.Trace(fmt.Sprintf("DbStore: collecting garbage...(%d chunks)", e)) + //s.collectGarbage(gcArrayFreeRatio) + //} } log.Trace(fmt.Sprintf("DbStore: quit batch write loop")) } @@ -762,9 +762,9 @@ func (s *LDBStore) setCapacity(c uint64) { if ratio > 1 { ratio = 1 } - for s.entryCnt > c { - s.collectGarbage(ratio) - } + //for s.entryCnt > c { + //s.collectGarbage(ratio) + //} } }