Repository navigation
[DPE-7882] fix(logical-replication): match replication peers by identity across models (8/8) - #349
Draft
marceloneppel wants to merge 8 commits into
Draft
marceloneppel wants to merge 8 commits into
marceloneppel wants to merge 8 commits into
Conversation
marceloneppel
force-pushed
the
lr-7-uuid-identity
branch
from
October 7, 2026 19:01
6581c40 to
da43af4
Compare
marceloneppel
added this pull request to stack #343
October 7, 2026 21:01
marceloneppel
force-pushed
the
lr-7-uuid-identity
branch
from
October 7, 2026 22:00
6291b1f to
6acd21a
Compare
marceloneppel
removed this pull request from stack #343
October 7, 2026 22:36
marceloneppel
added this pull request to stack #351
October 7, 2026 22:40
marceloneppel
force-pushed
the
lr-7-uuid-identity
branch
from
October 8, 2026 04:02
9020584 to
1530b9a
Compare
marceloneppel
force-pushed
the
lr-7-uuid-identity
branch
from
October 9, 2026 19:30
1530b9a to
4550272
Compare
marceloneppel
force-pushed
the
lr-7-uuid-identity
branch
from
October 9, 2026 19:44
4550272 to
85ab85a
Compare
…models App names are unique within one model only, and Juju renames cross-model relation remotes per side (remote-<model-uuid> on the offering side), so the circular-replication guards and chains keyed on bare app names got cross-model cases wrong in both directions: a legitimate subscription between two same-named apps in different models was rejected, while real cross-model cycles slipped through undetected. Every relation side now stamps its (model UUID, app name) identity into its own app-databag side, replication chains carry model-uuid/app-name tokens, and all comparison sites match by identity with a bare-name fallback for peers on older library versions. Validated: unit+lint green; charm-side circular integration suite 7/7 in the charm Multipass VM with the slice baked into the packed charm; CMR manual test end-to-end (same-name cross-model subscription replicates, mirrored request blocked with 'Circular replication detected').
marceloneppel
force-pushed
the
lr-7-uuid-identity
branch
from
October 9, 2026 20:22
85ab85a to
fb22b64
Compare
… the identity docstrings
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Eighth PR of the logical replication migration series (after #338). Completes the cross-model half of canonical/postgresql-operator#1085 and canonical/postgresql-k8s-operator#1052: the circular-replication guards and replication chains keyed on bare app names, which are only unique within one model — and Juju renames cross-model relation remotes per side (
remote-<model-uuid>on the offering side, the consume alias on the consuming side). That got cross-model cases wrong in both directions:Circular replication detected(chain-membership false positive), andSolution
Identity-based matching with a legacy fallback:
(model UUID, app name)identity into its own app-databag side (replication-identity) at the existing write points (process_offer,push_subscription_request,apply_updated_subscription_request),model-uuid/app-nametokens (own token appended on build),Validation
tox -e lintandtox -e unitgreen on this commit (4857 passed / 77 skipped).dpe-7882-reinstate-logical-replication+ zip-patched lib): 7/7 passed (test_deploy_clusters,test_setup_tables,test_bidirectional_same_table_blocked,test_bidirectional_different_tables_allowed,test_cleanup_ab_relations,test_multihop_circular_blocked,test_multihop_different_table_allowed).postgresqlapps in different models, offer/consume via data-integrators): the legitimate same-name cross-model subscription deployed, replicated a marker row in 26 s and stayed active (no false block); the mirrored request that closes the cycle was blocked withCircular replication detected.Checklist