From 6b177b7ab66ff616e62f2e8f76812285938609c9 Mon Sep 17 00:00:00 2001 From: Josh Klopfenstein Date: Thu, 28 Dec 2023 11:29:27 -0600 Subject: [PATCH] Decrease batch size for heavy migration (#1613) Mitigate the risk of OOMs on weak machines. --- migration/migration.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/migration.go b/migration/migration.go index 3f71de5c0a..41eecf23b9 100644 --- a/migration/migration.go +++ b/migration/migration.go @@ -63,8 +63,8 @@ var defaultMigrations = []Migration{ NewBucketMigrator(db.ContractStorage, migrateTrieNodesFromBitsetToTrieKey(db.ContractStorage)). WithKeyFilter(nodesFilter(db.ContractStorage)), NewBucketMover(db.Temporary, db.ContractStorage), - NewBucketMigrator(db.StateUpdatesByBlockNumber, changeStateDiffStruct).WithBatchSize(10_000), //nolint:gomnd - NewBucketMigrator(db.Class, migrateCairo1CompiledClass).WithBatchSize(1_000), //nolint:gomnd + NewBucketMigrator(db.StateUpdatesByBlockNumber, changeStateDiffStruct).WithBatchSize(1_000), //nolint:gomnd + NewBucketMigrator(db.Class, migrateCairo1CompiledClass).WithBatchSize(1_000), //nolint:gomnd } var ErrCallWithNewTransaction = errors.New("call with new transaction")