From b240031605a77c0f3232c657c52deb14f1dfb3d9 Mon Sep 17 00:00:00 2001 From: Phi-rjan Date: Wed, 5 Apr 2023 17:21:32 +0200 Subject: [PATCH] Limit moving gc threads (#10623) Co-authored-by: zenground0 --- blockstore/badger/blockstore.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blockstore/badger/blockstore.go b/blockstore/badger/blockstore.go index 1b52eb548..5527bf890 100644 --- a/blockstore/badger/blockstore.go +++ b/blockstore/badger/blockstore.go @@ -396,6 +396,9 @@ func (b *Blockstore) doCopy(from, to *badger.DB) error { if workers < 2 { workers = 2 } + if workers > 8 { + workers = 8 + } stream := from.NewStream() stream.NumGo = workers