feat: gdb failover support#1246
Merged
Merged
Conversation
410a5e4 to
052135f
Compare
sophia-bq
approved these changes
Jun 9, 2026
32dde0e to
69011e9
Compare
69011e9 to
88363d9
Compare
AhmadMasry
added a commit
to AhmadMasry/aws-advanced-python-wrapper
that referenced
this pull request
Jun 17, 2026
Brings in gdb failover support (aws#1246). Conflict resolution: - failover_v2_plugin.py (_failover_writer): took main's RetryUtil-based refactor, which replaces the inline writer-candidate logic our branch had only lightly tweaked. - test_aurora_failover.py (test_fail_from_reader_to_writer matrix): kept our branch's deliberate drop of host_monitoring (v1) entries (libpq teardown SIGSEGV flake fix) while adding main's new gdb_failover variant in its v2-only form, per the same rationale. - retry_util.py (RetryUtil.close_connection): added conn=conn to the CONNECTION_CLOSE execute() call to match our branch's convention that prevents the cross-thread use-after-free race on close-during-failover.
AhmadMasry
added a commit
to AhmadMasry/aws-advanced-python-wrapper
that referenced
this pull request
Jun 17, 2026
The merge of main brought in the sync GDB (Aurora Global Database) failover plugin (GdbFailoverPlugin + RetryUtil) with no async equivalent. This adds that parity: - aio/retry_util.py: AsyncRetryUtil, the async port of the sync RetryUtil deadline-bounded connect-and-verify-role retry loop. Adapted to async: force_connect (not connect) so auth plugins re-apply and the pooled provider is bypassed; abort_connection for close; each connect await bounded by the remaining deadline so a blackholed host can't hang failover. - aio/gdb_failover_plugin.py: AsyncGdbFailoverPlugin(AsyncFailoverPlugin) overriding _do_failover with region-aware, GdbFailoverMode-driven target selection mirroring the sync plugin's _failover_with_mode. - aio/failover_plugin.py: extract _is_strict_writer_failover_mode (behavior-preserving) so the GDB subclass can make the read-only escape hatch region-aware. - aio/plugin_factory.py: register "gdb_failover" (weight 420). Reuses GdbFailoverMode, RdsUtils, properties and message keys as-is. 24 new unit tests (test_aio_retry_util.py, test_aio_gdb_failover.py); full unit suite green (2011 passed), flake8 + isort clean.
AhmadMasry
added a commit
to AhmadMasry/aws-advanced-python-wrapper
that referenced
this pull request
Jun 17, 2026
… async Extends the async GDB failover parity to match what aws#1246 did on the sync side (integration-test matrix + docs): - test_aurora_failover_async.py: add the distinct `gdb_failover` plugin to all 8 failover test matrices alongside `failover_v2` (and `gdb_failover,host_monitoring_v2` / `aurora_connection_tracker,gdb_failover` for the compound ones), mirroring sync test_aurora_failover.py. Async ships one failover plugin so the failover/failover_v2 aliases collapse to one entry, but gdb_failover is a separate region-aware plugin and is exercised on its own. - UsingTheGdbFailoverPlugin.md: add an "Async wrapper." note (matching the one in UsingTheFailover2Plugin.md) documenting the `gdb_failover` async code and that the home-region parameters/modes behave identically in async. The aws#1246 integration_tests.yml change was only the removal of a temporary feat/gdb-rw branch trigger (not gdb test config), so nothing to mirror there; async tests run under the same workflow.
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.
Description
Added GDB Failover support.
Added retry writer connection logic to GDB Failover and Failover 2 plugin.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.