discovery/gossiper: increase validation barrier size to 1000

This allows for a 1000 different validation operations to proceed
concurrently. Now that we are batching operations at the db level, the
average number of outstanding requests will be higher since the commit
latency has increased. To compensate, we allow for more outstanding
requests to keep the gossiper busy while batches are constructed.
This commit is contained in:
Conner Fromknecht 2020-11-24 16:39:47 -08:00
parent edaa5d4308
commit f8154c65c5
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

View File

@ -4,7 +4,6 @@ import (
"bytes"
"errors"
"fmt"
"runtime"
"sync"
"time"
@ -904,9 +903,7 @@ func (d *AuthenticatedGossiper) networkHandler() {
// We'll use this validation to ensure that we process jobs in their
// dependency order during parallel validation.
validationBarrier := routing.NewValidationBarrier(
runtime.NumCPU()*4, d.quit,
)
validationBarrier := routing.NewValidationBarrier(1000, d.quit)
for {
select {