From 2991a6b645ca98b8b7a0d7f238dfcb3311898f02 Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Sat, 2 Dec 2023 18:09:53 +0700 Subject: [PATCH] integration: run_migration must not use `Accede` mode (#8867) --- cmd/integration/commands/root.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/cmd/integration/commands/root.go b/cmd/integration/commands/root.go index 61628fd1b3c..95120c4f822 100644 --- a/cmd/integration/commands/root.go +++ b/cmd/integration/commands/root.go @@ -61,10 +61,11 @@ func RootCommand() *cobra.Command { func dbCfg(label kv.Label, path string) kv2.MdbxOpts { const ThreadsLimit = 9_000 limiterB := semaphore.NewWeighted(ThreadsLimit) - opts := kv2.NewMDBX(log.New()).Path(path).Label(label).RoTxsLimiter(limiterB).Accede() - //if label == kv.ChainDB { - // opts = opts.MapSize(8 * datasize.TB) - //} + opts := kv2.NewMDBX(log.New()).Path(path).Label(label).RoTxsLimiter(limiterB) + // integration tool don't intent to create db, then easiest way to open db - it's pass mdbx.Accede flag, which allow + // to read all options from DB, instead of overriding them + opts = opts.Accede() + if databaseVerbosity != -1 { opts = opts.DBVerbosity(kv.DBVerbosityLvl(databaseVerbosity)) } @@ -72,10 +73,6 @@ func dbCfg(label kv.Label, path string) kv2.MdbxOpts { } func openDB(opts kv2.MdbxOpts, applyMigrations bool, logger log.Logger) (kv.RwDB, error) { - // integration tool don't intent to create db, then easiest way to open db - it's pass mdbx.Accede flag, which allow - // to read all options from DB, instead of overriding them - opts = opts.Accede() - db := opts.MustOpen() if applyMigrations { migrator := migrations.NewMigrator(opts.GetLabel())