[DPE-10203] refactor(async-replication): use the async replication module from the single kernel library - #1944
Draft
marceloneppel wants to merge 1 commit into
Draft
Conversation
marceloneppel
force-pushed
the
dpe-10203-migrate-async-replication-vm
branch
from
September 4, 2026 23:08
6996063 to
cdb5708
Compare
…dule from the single kernel library Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
marceloneppel
force-pushed
the
dpe-10203-migrate-async-replication-vm
branch
from
September 4, 2026 23:23
cdb5708 to
00ce996
Compare
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
Adopts the async-replication module from the single kernel library, following its migration series (postgresql-single-kernel-library #277–#284, ported from the VM and K8s charm modules). The library stack head pinned here (
aa9d9ad29874841c4ce0ce1ec2c97bb5afcf1805) includes the DPE-10203 dead-datacenter recovery changes from #1913.Solution
src/relations/async_replication.pyin favour of the library'sPostgreSQLAsyncReplicationevents handler andAsyncReplicationManager, constructed by the charm as composition root with the watcher relation injected (watcher=self.watcher_offer) — the handler calls back through theupdate_config/set_unit_status/set_app_status/set_primary_status_messagebridges, so the refresh-priority status gate stays charm-owned._planned_unitsgoal-state fallback (used by_set_primary_status_messageand the backups pre-checks),clear_stale_promotion()on update-status, and the stalestandby_clusterDCS clear inupdate_configwhen no async primary endpoint remains.pyproject.toml/poetry.lockpinpostgresql-charms-single-kernelto the library stack archive until the series merges and 16.3.13 is released.Provenance: ported from this module at 03494fb plus #1913 (
dpe-10203-async-replication-recovery); unit tests ported to the library handler surface with the #1913 test semantics preserved.