Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def connect(self, target_driver_func: Callable, driver_dialect: DriverDialect, h
if not url_type.is_rds_cluster:
return connect_func()

if url_type == RdsUrlType.RDS_WRITER_CLUSTER:
if url_type == RdsUrlType.RDS_WRITER_CLUSTER or url_type == RdsUrlType.RDS_GLOBAL_WRITER_CLUSTER:
writer_candidate_conn: Optional[Connection] = self._get_verified_writer_connection(props, is_initial_connection, connect_func)
if writer_candidate_conn is None:
return connect_func()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def get_verified_initial_connection(

if (
url_type == RdsUrlType.RDS_WRITER_CLUSTER
or url_type == RdsUrlType.RDS_GLOBAL_WRITER_CLUSTER
or self._verify_initial_connection_type == HostRole.WRITER
):
conn = self._get_verified_connection(host_info, HostRole.WRITER, plugin_service_connect_func, connect_func)
Expand Down
3 changes: 2 additions & 1 deletion aws_advanced_python_wrapper/stale_dns_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def get_verified_connection(self, is_initial_connection: bool, host_list_provide
:param connect_func:
:return:
"""
if not self._rds_helper.is_writer_cluster_dns(host_info.host):
if not self._rds_helper.is_writer_cluster_dns(host_info.host) \
and not self._rds_helper.is_global_db_writer_cluster_dns(host_info.host):
return connect_func()

conn: Connection = connect_func()
Expand Down
Loading