Skip to content

Commit

Permalink
Limit moving gc threads (#10623)
Browse files Browse the repository at this point in the history
Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
  • Loading branch information
rjan90 and ZenGround0 authored Apr 5, 2023
1 parent 33039d2 commit b240031
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions blockstore/badger/blockstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b240031

Please # to comment.