File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1105,8 +1105,11 @@ func (this *Migrator) iterateChunks() error {
1105
1105
1106
1106
// When hasFurtherRange is false, original table might be write locked and CalculateNextIterationRangeEndValues would hangs forever
1107
1107
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 {
1110
1113
return terminateRowIteration (err )
1111
1114
}
1112
1115
if ! hasFurtherRange {
@@ -1128,7 +1131,7 @@ func (this *Migrator) iterateChunks() error {
1128
1131
}
1129
1132
_ , rowsAffected , _ , err := this .applier .ApplyIterationInsertQuery ()
1130
1133
if err != nil {
1131
- return terminateRowIteration ( err )
1134
+ return err // wrapping call will retry
1132
1135
}
1133
1136
atomic .AddInt64 (& this .migrationContext .TotalRowsCopied , rowsAffected )
1134
1137
atomic .AddInt64 (& this .migrationContext .Iteration , 1 )
You can’t perform that action at this time.
0 commit comments