Improve applier .ReadMigrationRangeValues() func accuracy#1164
Conversation
shlomi-noach
left a comment
There was a problem hiding this comment.
This change is fine. Ultimately it does not matter that much: we take note of the binlog position before we evaluate the min/max range values. That means however we read the min/max values, any changes that happen in between -- we will address those changes as we iterate the binary logs; the changes will be covered by the binlog stream that we process.
Thanks @shlomi-noach! Yeah I think so, I'm glad this didn't break any assumptions I didn't know about 👍
Agreed, I think this is more of a cosmetic change that won't actually affect the correctness of the end-result |
Description
This PR moves the applier
.ReadMigrationRangeValues()func to use a single transaction for both the min and max queriesGathering 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()script/cibuildreturns with no formatting errors, build errors or unit test errors.