Limit moving gc threads (#10623)

Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
This commit is contained in:
Phi-rjan 2023-04-05 17:21:32 +02:00 committed by GitHub
parent 33039d2cec
commit b240031605
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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