Merge pull request #438 from github/dml-batch-size-cap

--dml-batch-size cap at 1000
This commit is contained in:
Shlomi Noach 2017-07-05 10:11:35 +03:00 committed by GitHub
commit 515e2bedb8

View File

@ -47,6 +47,7 @@ const (
const (
HTTPStatusOK = 200
maxBatchSize = 1000
)
var (
@ -441,8 +442,8 @@ func (this *MigrationContext) SetDMLBatchSize(batchSize int64) {
if batchSize < 1 {
batchSize = 1
}
if batchSize > 100 {
batchSize = 100
if batchSize > maxBatchSize {
batchSize = maxBatchSize
}
atomic.StoreInt64(&this.DMLBatchSize, batchSize)
}