Skip to content

feat: gdb failover support#1246

Open
karenc-bq wants to merge 3 commits into
mainfrom
feat/gdb-failover
Open

feat: gdb failover support#1246
karenc-bq wants to merge 3 commits into
mainfrom
feat/gdb-failover

Conversation

@karenc-bq

Copy link
Copy Markdown
Contributor

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.

@karenc-bq karenc-bq force-pushed the feat/gdb-failover branch from 410a5e4 to 052135f Compare June 8, 2026 19:53
@karenc-bq karenc-bq marked this pull request as ready for review June 8, 2026 19:53
Comment thread docs/using-the-python-wrapper/using-plugins/UsingTheGdbFailoverPlugin.md Outdated
Comment thread docs/using-the-python-wrapper/using-plugins/UsingTheGdbFailoverPlugin.md Outdated
Comment thread docs/using-the-python-wrapper/using-plugins/UsingTheGdbFailoverPlugin.md Outdated
# Roles in the host list might be stale, so verify the role with a query.
role = plugin_service.get_host_role(candidate_conn) if verify_role is not None else None
if verify_role is None or verify_role == role:
updated_host_info = HostInfo(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we always need to update the host - what if the role the query returns is the same as it was before? Just wondering if we lose some aspects of the host info by recreating it?

self._active_home_failover_mode = GlobalDbFailoverMode.from_value(
WrapperProperties.ACTIVE_HOME_FAILOVER_MODE.get(self._properties))
self._inactive_home_failover_mode = GlobalDbFailoverMode.from_value(
WrapperProperties.INACTIVE_HOME_FAILOVER_MODE.get(self._properties))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's a change to design but we do trigger failover if we are connected to a reader and get a read-only exception on a write in failover v1 and v2 - should we set failover_mode here so that that also happens for gdb?

# For STRICT_WRITER failover mode when connection exception indicate that the connection's in read-only mode, initiate a failover by returning true.
        return self._failover_mode == FailoverMode.STRICT_WRITER and \
            self._plugin_service.is_read_only_connection_exception(exception)

@karenc-bq karenc-bq force-pushed the feat/gdb-failover branch from 052135f to aeea961 Compare June 11, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants