Skip to content

Commit

Permalink
Decrease batch size for heavy migration (#1613)
Browse files Browse the repository at this point in the history
Mitigate the risk of OOMs on weak machines.
  • Loading branch information
joshklop authored Dec 28, 2023
1 parent 6222563 commit 6b177b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions migration/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 6b177b7

Please sign in to comment.