You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#20917 (fixing #20915) made CreateLookupIndex backfill streams ignore MigrationType_TABLES resharding journals and keep replicating from their current source. That is correct in the default configuration because the paired workflow keeps feeding the stream's source keyspace after a traffic switch (reverse replication for SwitchTraffic, the resumed forward workflow for ReverseTraffic).
With --enable-reverse-replication=false, that assumption does not hold: journals are still written unconditionally (server.go, createJournals runs before the reverse-start branch), the reverse streams are created Stopped (traffic_switcher.go) and never started, and nothing feeds the switched-away keyspace afterward. An active lookup vindex backfill sourcing that keyspace keeps running against a source that no longer receives writes and silently goes stale. It can catch up only if reverse replication is started (or the switch reversed) while the source tables and the needed binlogs still exist; otherwise the lookup vindex must be rebuilt.
This cannot be handled at the tablet/vplayer layer: the Journal proto carries no reverse-replication state, and adding one is a wire-visible change with mixed-version implications. The right layer is vtctld orchestration, which knows both the switch configuration and the topology.
Suggested approach
During SwitchTraffic/ReverseTraffic with --enable-reverse-replication=false, discover CreateLookupIndex workflows — in any keyspace, since lookup workflows live wherever the lookup table lives — whose source is the keyspace being switched away from.
Decide the response: refuse the switch (with a --force-style override) or emit a prominent warning. Refusal is safer but has false-positive risk to weigh: frozen/externalized lookup workflows no longer depend on the stream and should not block a switch; an operator intentionally abandoning the source may not care.
Cross-keyspace workflow discovery in the switch path has a cost; scope it to run only when reverse replication is disabled.
e2e coverage: a MoveTables SwitchTraffic --enable-reverse-replication=false with an active lookup backfill, pinning whichever behavior (refusal or warning) is chosen. Deferred from VReplication: LookupVindex streams must not follow TABLES journals #20917 because at the vplayer the gate's behavior is identical regardless of the flag — only the orchestration layer can act on it.
Overview
#20917 (fixing #20915) made
CreateLookupIndexbackfill streams ignoreMigrationType_TABLESresharding journals and keep replicating from their current source. That is correct in the default configuration because the paired workflow keeps feeding the stream's source keyspace after a traffic switch (reverse replication forSwitchTraffic, the resumed forward workflow forReverseTraffic).With
--enable-reverse-replication=false, that assumption does not hold: journals are still written unconditionally (server.go,createJournalsruns before the reverse-start branch), the reverse streams are createdStopped(traffic_switcher.go) and never started, and nothing feeds the switched-away keyspace afterward. An active lookup vindex backfill sourcing that keyspace keeps running against a source that no longer receives writes and silently goes stale. It can catch up only if reverse replication is started (or the switch reversed) while the source tables and the needed binlogs still exist; otherwise the lookup vindex must be rebuilt.This cannot be handled at the tablet/vplayer layer: the
Journalproto carries no reverse-replication state, and adding one is a wire-visible change with mixed-version implications. The right layer is vtctld orchestration, which knows both the switch configuration and the topology.Suggested approach
SwitchTraffic/ReverseTrafficwith--enable-reverse-replication=false, discoverCreateLookupIndexworkflows — in any keyspace, since lookup workflows live wherever the lookup table lives — whose source is the keyspace being switched away from.--force-style override) or emit a prominent warning. Refusal is safer but has false-positive risk to weigh: frozen/externalized lookup workflows no longer depend on the stream and should not block a switch; an operator intentionally abandoning the source may not care.SwitchTraffic --enable-reverse-replication=falsewith an active lookup backfill, pinning whichever behavior (refusal or warning) is chosen. Deferred from VReplication: LookupVindex streams must not follow TABLES journals #20917 because at the vplayer the gate's behavior is identical regardless of the flag — only the orchestration layer can act on it.References
registerJournalrefusal; documents this limitation in its Deployment Notes.transitionJournal).