Skip to content

Commit 515e2be

Browse files
author
Shlomi Noach
authored
Merge pull request #438 from github/dml-batch-size-cap
--dml-batch-size cap at 1000
2 parents 31005ac + f9788a6 commit 515e2be

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

go/base/context.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const (
4747

4848
const (
4949
HTTPStatusOK = 200
50+
maxBatchSize = 1000
5051
)
5152

5253
var (
@@ -441,8 +442,8 @@ func (this *MigrationContext) SetDMLBatchSize(batchSize int64) {
441442
if batchSize < 1 {
442443
batchSize = 1
443444
}
444-
if batchSize > 100 {
445-
batchSize = 100
445+
if batchSize > maxBatchSize {
446+
batchSize = maxBatchSize
446447
}
447448
atomic.StoreInt64(&this.DMLBatchSize, batchSize)
448449
}

0 commit comments

Comments
 (0)