Skip to content

Commit

Permalink
Fix bug with too much rows being buffered by Migration Tool
Browse files Browse the repository at this point in the history
  • Loading branch information
mkubala committed Oct 19, 2020
1 parent d12a28c commit e1b330f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private[migration] class V2__Extract_journal_metadata(
snapshotTableConfig.schemaName.map(_ + ".").getOrElse("") + snapshotTableConfig.tableName

private val migrationConf: Config = globalConfig.getConfig("akka-persistence-postgres.migration")
private val migrationBatchSize: Long = migrationConf.getLong("v2.batchSize")
private val migrationBatchSize: Int = migrationConf.getInt("v2.batchSize")
private val conversionParallelism: Int = migrationConf.getInt("v2.parallelism")

@throws[Exception]
Expand Down Expand Up @@ -101,7 +101,7 @@ private[migration] class V2__Extract_journal_metadata(
.withStatementParameters(
rsType = ResultSetType.ForwardOnly,
rsConcurrency = ResultSetConcurrency.ReadOnly,
fetchSize = migrationBatchSize.max(Int.MaxValue).toInt)
fetchSize = migrationBatchSize)
.transactionally)
}

Expand Down Expand Up @@ -162,7 +162,7 @@ private[migration] class V2__Extract_journal_metadata(
.withStatementParameters(
rsType = ResultSetType.ForwardOnly,
rsConcurrency = ResultSetConcurrency.ReadOnly,
fetchSize = migrationBatchSize.max(Int.MaxValue).toInt)
fetchSize = migrationBatchSize)
.transactionally
}
}
Expand Down

0 comments on commit e1b330f

Please sign in to comment.