-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
comparing RelationMessage against TableSchema, stop caching RelationM…
…essages (#1438) Previously we diffed the previous and current `RelationMessages` received from Postgres during logical replication to ascertain if the schema changed or not. This fails in cases where the schema changed after mirror setup but before we get the first `RelationMessage` which can happen a) during initial load, before CDC and b) during CDC, if no rows are synced before schema changes are made. This causes a desync between PeerDB's view of the table and the actual status of the table, causing issues. Changed to diff from the current `TableSchema` instead, which should always be present. Eliminates having to store and pass `RelationMessageMapping` around, it is scoped to reading from the replication connection. Also fixes bugs with schema changes being handled incorrectly for PG and BQ, and schema audits being logged without schema deltas actually being present.
- Loading branch information
1 parent
120786f
commit 9432e24
Showing
9 changed files
with
112 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.