mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
Revert "apply --db.read.concurrency flag value when open embedded db" (#5550)
This reverts commit f654ee0dc2
.
This commit is contained in:
parent
a968c7ed5b
commit
325bff181e
@ -384,7 +384,7 @@ var (
|
||||
DBReadConcurrencyFlag = cli.IntFlag{
|
||||
Name: "db.read.concurrency",
|
||||
Usage: "Does limit amount of parallel db reads. Default: equal to GOMAXPROCS (or number of CPU)",
|
||||
Value: cmp.Max(10, runtime.GOMAXPROCS(-1)*4),
|
||||
Value: cmp.Max(10, runtime.GOMAXPROCS(-1)*2),
|
||||
}
|
||||
RpcAccessListFlag = cli.StringFlag{
|
||||
Name: "rpc.accessList",
|
||||
|
@ -30,7 +30,6 @@ import (
|
||||
"github.com/c2h5oh/datasize"
|
||||
"github.com/ledgerwatch/erigon/node/nodecfg"
|
||||
"github.com/ledgerwatch/erigon/params"
|
||||
"golang.org/x/sync/semaphore"
|
||||
|
||||
"github.com/gofrs/flock"
|
||||
"github.com/ledgerwatch/erigon-lib/kv"
|
||||
@ -320,8 +319,7 @@ func OpenDatabase(config *nodecfg.Config, logger log.Logger, label kv.Label) (kv
|
||||
var openFunc func(exclusive bool) (kv.RwDB, error)
|
||||
log.Info("Opening Database", "label", name, "path", dbPath)
|
||||
openFunc = func(exclusive bool) (kv.RwDB, error) {
|
||||
roTxsLimiter := semaphore.NewWeighted(int64(config.Http.DBReadConcurrency)) // 1 less than max to allow unlocking to happen
|
||||
opts := mdbx.NewMDBX(logger).Path(dbPath).Label(label).DBVerbosity(config.DatabaseVerbosity).RoTxsLimiter(roTxsLimiter)
|
||||
opts := mdbx.NewMDBX(logger).Path(dbPath).Label(label).DBVerbosity(config.DatabaseVerbosity)
|
||||
if exclusive {
|
||||
opts = opts.Exclusive()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user