Skip to content

Commit

Permalink
Merge pull request #835 from ajm188/handle_driver_timeout_error
Browse files Browse the repository at this point in the history
Add a check to rows.Err after processing all rows
  • Loading branch information
timvaillancourt authored Aug 20, 2020
2 parents ebb1de5 + 8b3a8be commit c940a85
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions go/logic/applier.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ func (this *Applier) ReadMigrationMinValues(uniqueKey *sql.UniqueKey) error {
}
}
this.migrationContext.Log.Infof("Migration min values: [%s]", this.migrationContext.MigrationRangeMinValues)

err = rows.Err()
return err
}

Expand All @@ -391,6 +393,8 @@ func (this *Applier) ReadMigrationMaxValues(uniqueKey *sql.UniqueKey) error {
}
}
this.migrationContext.Log.Infof("Migration max values: [%s]", this.migrationContext.MigrationRangeMaxValues)

err = rows.Err()
return err
}

Expand Down Expand Up @@ -443,6 +447,9 @@ func (this *Applier) CalculateNextIterationRangeEndValues() (hasFurtherRange boo
}
hasFurtherRange = true
}
if err = rows.Err(); err != nil {
return hasFurtherRange, err
}
if hasFurtherRange {
this.migrationContext.MigrationIterationRangeMaxValues = iterationRangeMaxValues
return hasFurtherRange, nil
Expand Down

0 comments on commit c940a85

Please sign in to comment.