Merge pull request #438 from github/dml-batch-size-cap
--dml-batch-size cap at 1000
This commit is contained in:
commit
515e2bedb8
@ -47,6 +47,7 @@ const (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
HTTPStatusOK = 200
|
HTTPStatusOK = 200
|
||||||
|
maxBatchSize = 1000
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -441,8 +442,8 @@ func (this *MigrationContext) SetDMLBatchSize(batchSize int64) {
|
|||||||
if batchSize < 1 {
|
if batchSize < 1 {
|
||||||
batchSize = 1
|
batchSize = 1
|
||||||
}
|
}
|
||||||
if batchSize > 100 {
|
if batchSize > maxBatchSize {
|
||||||
batchSize = 100
|
batchSize = maxBatchSize
|
||||||
}
|
}
|
||||||
atomic.StoreInt64(&this.DMLBatchSize, batchSize)
|
atomic.StoreInt64(&this.DMLBatchSize, batchSize)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user