Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replicators: Set replication offsets for newly-created tables
After replicating a DDL change including one or more CREATE TABLE statements, set the replication offset for those tables to the replication offset of that DDL change, so that newly-created tables start with a replication offset. This avoids the issue where if we restart the replicator for any reason after creating a table but before that table gets any writes, we'll end up with a None replication offset and have to resnapshot everything. This is all happening non-atomically (via multiple RPC calls to the controller) primarily for code simplicity - it's still correct though because as a last resort in the case where we fail before setting the replication offsets for all tables we'll still just resnapshot everything. Refs: ENG-2655 Change-Id: Iec264764d6826b41e3567a072ecfafb29dc497e5 Reviewed-on: https://gerrit.readyset.name/c/readyset/+/4470 Tested-by: Buildkite CI Reviewed-by: Fran Noriega <fran@readyset.io> Reviewed-by: Nick Marino <nick@readyset.io>
- Loading branch information