Closed Rentacookie closed 1 day ago
Latest commit: 04b0fdda44814d855b6e1800857f9266a4b7ad44
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Thanks for the review guys 🙏
This changeset addresses some issues which were found during further testing of the MySQL alpha release:
Type Discrepancies:
Some differences in the values read from the MySQL replication stream and values read directly from the database during snapshots were detected. These mismatches were addressed by consolidating the type handling into in the powersync service only. Previously some type mappings were already happening upstream in the Zongji Binlog Listener.
Duplicate ServerIds:
MySQL expects replication clients to have unique ServerIds. Previously we were using the default value of 1. This proved to be a problem when deploying new sync rules since for a brief time both the old and the new replication were active causing one of the replication instances to throw an error. This was resolved by generating a random ServerId on startup based off of the current syncRuleId. Since we use GTID based replication and keep track of our position in the binlog ourself, it doesn't matter that the serverId changes regularly.
Enabled unit tests in CI:
Added the configuration so that the MySQL unit tests run as part of the build.