Limit moving gc threads (#10623)

Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
This commit is contained in:
Phi-rjan
2023-04-05 11:21:32 -04:00
committed by GitHub
co-authored by zenground0
parent 33039d2cec
commit b240031605
+3
View File
@@ -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