Skip to content

Commit e1b330f

Browse files
committed
Fix bug with too much rows being buffered by Migration Tool
1 parent d12a28c commit e1b330f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

migration/src/main/scala/akka/persistence/postgres/migration/v2/V2__Extract_journal_metadata.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private[migration] class V2__Extract_journal_metadata(
6262
snapshotTableConfig.schemaName.map(_ + ".").getOrElse("") + snapshotTableConfig.tableName
6363

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

6868
@throws[Exception]
@@ -101,7 +101,7 @@ private[migration] class V2__Extract_journal_metadata(
101101
.withStatementParameters(
102102
rsType = ResultSetType.ForwardOnly,
103103
rsConcurrency = ResultSetConcurrency.ReadOnly,
104-
fetchSize = migrationBatchSize.max(Int.MaxValue).toInt)
104+
fetchSize = migrationBatchSize)
105105
.transactionally)
106106
}
107107

@@ -162,7 +162,7 @@ private[migration] class V2__Extract_journal_metadata(
162162
.withStatementParameters(
163163
rsType = ResultSetType.ForwardOnly,
164164
rsConcurrency = ResultSetConcurrency.ReadOnly,
165-
fetchSize = migrationBatchSize.max(Int.MaxValue).toInt)
165+
fetchSize = migrationBatchSize)
166166
.transactionally
167167
}
168168
}

0 commit comments

Comments
 (0)