extracted on-throttle functions outside loop
This commit is contained in:
parent
a1a34b8150
commit
80163b35b6
@ -399,16 +399,14 @@ func (this *Migrator) iterateChunks() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *Migrator) executeWriteFuncs() error {
|
func (this *Migrator) executeWriteFuncs() error {
|
||||||
for {
|
onStartThrottling := func() {
|
||||||
this.throttle(
|
|
||||||
func() {
|
|
||||||
log.Debugf("throttling writes")
|
log.Debugf("throttling writes")
|
||||||
},
|
}
|
||||||
nil,
|
onEndThrottling := func() {
|
||||||
func() {
|
|
||||||
log.Debugf("done throttling writes")
|
log.Debugf("done throttling writes")
|
||||||
},
|
}
|
||||||
)
|
for {
|
||||||
|
this.throttle(onStartThrottling, nil, onEndThrottling)
|
||||||
// We give higher priority to event processing, then secondary priority to
|
// We give higher priority to event processing, then secondary priority to
|
||||||
// rowcopy
|
// rowcopy
|
||||||
select {
|
select {
|
||||||
|
Loading…
Reference in New Issue
Block a user