diff --git a/aws_advanced_python_wrapper/aurora_initial_connection_strategy_plugin.py b/aws_advanced_python_wrapper/aurora_initial_connection_strategy_plugin.py index d99c469a..112c7c9b 100644 --- a/aws_advanced_python_wrapper/aurora_initial_connection_strategy_plugin.py +++ b/aws_advanced_python_wrapper/aurora_initial_connection_strategy_plugin.py @@ -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() diff --git a/aws_advanced_python_wrapper/simple_read_write_splitting_plugin.py b/aws_advanced_python_wrapper/simple_read_write_splitting_plugin.py index 1dd14110..544e8775 100644 --- a/aws_advanced_python_wrapper/simple_read_write_splitting_plugin.py +++ b/aws_advanced_python_wrapper/simple_read_write_splitting_plugin.py @@ -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) diff --git a/aws_advanced_python_wrapper/stale_dns_plugin.py b/aws_advanced_python_wrapper/stale_dns_plugin.py index 2d24461a..0491b169 100644 --- a/aws_advanced_python_wrapper/stale_dns_plugin.py +++ b/aws_advanced_python_wrapper/stale_dns_plugin.py @@ -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()