gh-ost icon indicating copy to clipboard operation
gh-ost copied to clipboard

Improve applier `.ReadMigrationRangeValues()` func accuracy

Open timvaillancourt opened this issue 3 years ago • 0 comments

Description

This PR moves the applier .ReadMigrationRangeValues() func to use a single transaction for both the min and max queries

Gathering these values in the same transaction is more accurate than the current approach where 2 x different auto-commit transactions grab these values

Lastly, the min/max funcs were made "private" because they're only called by .ReadMigrationRangeValues()

In case this PR introduced Go code changes:

  • [x] contributed code is using same conventions as original code
  • [x] script/cibuild returns with no formatting errors, build errors or unit test errors.

timvaillancourt avatar Aug 13 '22 00:08 timvaillancourt