File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1105,8 +1105,11 @@ func (this *Migrator) iterateChunks() error {
11051105
11061106 // When hasFurtherRange is false, original table might be write locked and CalculateNextIterationRangeEndValues would hangs forever
11071107
1108- hasFurtherRange , err := this .applier .CalculateNextIterationRangeEndValues ()
1109- if err != nil {
1108+ hasFurtherRange := false
1109+ if err := this .retryOperation (func () (e error ) {
1110+ hasFurtherRange , e = this .applier .CalculateNextIterationRangeEndValues ()
1111+ return e
1112+ }); err != nil {
11101113 return terminateRowIteration (err )
11111114 }
11121115 if ! hasFurtherRange {
@@ -1128,7 +1131,7 @@ func (this *Migrator) iterateChunks() error {
11281131 }
11291132 _ , rowsAffected , _ , err := this .applier .ApplyIterationInsertQuery ()
11301133 if err != nil {
1131- return terminateRowIteration ( err )
1134+ return err // wrapping call will retry
11321135 }
11331136 atomic .AddInt64 (& this .migrationContext .TotalRowsCopied , rowsAffected )
11341137 atomic .AddInt64 (& this .migrationContext .Iteration , 1 )
You can’t perform that action at this time.
0 commit comments