Skip to content

Commit 70f6db7

Browse files
committed
fix dialect detection
cleanup rebase fix unit tests; code style docs fix 'failover' plugin for GDB; add PG support for GDB adopt GDB support including Global Writer Endpoint to failover2
1 parent 95a90a2 commit 70f6db7

32 files changed

+850
-272
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ With the `failover` plugin, the downtime during certain DB cluster operations, s
3737

3838
Visit [this page](./docs/using-the-jdbc-driver/SupportForRDSMultiAzDBCluster.md) for more details.
3939

40+
### Using the AWS JDBC Driver with Amazon Aurora Global Databases
41+
42+
This driver supports in-region `failover` and between-regions `planned failover` and `switchover` of [Amazon Aurora Global Databases](https://aws.amazon.com/ru/rds/aurora/global-database/). A [Global Writer Endpoint](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-connecting.html) is also recognized and can be handled to minimize potential stale DNS issue. Please check [failover plugin](./docs/using-the-jdbc-driver/using-plugins/UsingTheFailoverPlugin.md), [failover2 plugin](./docs/using-the-jdbc-driver/using-plugins/UsingTheFailover2Plugin.md) and [Aurora Initial Connection Strategy plugin](./docs/using-the-jdbc-driver/using-plugins/UsingTheAuroraInitialConnectionStrategyPlugin.md) for more information.
43+
4044
### Using the AWS JDBC Driver with plain RDS databases
4145
The AWS JDBC Driver also works with RDS provided databases that are not Aurora.
4246

@@ -128,10 +132,6 @@ The development team is aware of these limitations and is working to improve the
128132

129133
[^1]: Aurora MySQL requires v3.07 or later.
130134

131-
#### Amazon Aurora Global Databases
132-
133-
This driver currently does not support `planned failover` or `switchover` of Amazon Aurora Global Databases. Failing over to a secondary cluster will result in errors and there may be additional unforeseen errors when working with global databases. Connecting to the primary cluster is fully supported. There is a limitation when connected to the secondary cluster; the [failover2 plugin](using-the-jdbc-driver/using-plugins/UsingTheFailover2Plugin) will not work on the secondary cluster, however the [failover plugin](using-the-jdbc-driver/using-plugins/UsingTheFailoverPlugin) will work. Full Support for Amazon Aurora Global Databases is in the backlog, but we cannot comment on a timeline right now.
134-
135135
## Examples
136136

137137
| Description | Examples |
@@ -153,7 +153,7 @@ This driver currently does not support `planned failover` or `switchover` of Ama
153153
| Using Spring and Wildfly with the AWS JDBC Driver | [PostgreSQL](examples/SpringWildflyExample/README.md) |
154154
| Using Vert.x and c3p0 with the AWS JDBC Driver | [PostgreSQL](examples/VertxExample/README.md) |
155155
| Using the AWS JDBC Driver with Telemetry and using the AWS Distro for OpenTelemetry Collector | [PostgreSQL](examples/AWSDriverExample/src/main/java/software/amazon/TelemetryMetricsOTLPExample.java) |
156-
| Using the AWS JDBC Driver with Telemetry and using the AWS X-Ray Daemon | [PostgreSQL](examples/AWSDriverExample/src/main/java/software/amazon/TelemetryMetricsXRayExample.java) |
156+
| Using the AWS JDBC Driver with Telemetry and using the AWS X-Ray Daemon | [PostgreSQL](examples/AWSDriverExample/src/main/java/software/amazon/TelemetryTracingXRayExample.java) |
157157

158158
## Getting Help and Opening Issues
159159
If you encounter a bug with the AWS JDBC Driver, we would like to hear about it.

docs/using-the-jdbc-driver/DatabaseDialects.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ The AWS Advanced JDBC Driver is a wrapper that requires an underlying driver, an
1616
Dialect codes specify what kind of database any connections will be made to.
1717

1818
| Dialect Code Reference | Value | Database |
19-
| ---------------------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
20-
| `AURORA_MYSQL` | `aurora-mysql` | Aurora MySQL |
19+
| ---------------------------- | ---------------------------- |----------------------------------------------------------------------------------------------------------------------------------------------------|
20+
| `AURORA_MYSQL` | `aurora-mysql` | [Aurora MySQL](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_GettingStartedAurora.html) |
21+
| `GLOBAL_AURORA_MYSQL` | `global-aurora-mysql` | [Aurora Global Database MySQL](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-getting-started.html) |
2122
| `RDS_MULTI_AZ_MYSQL_CLUSTER` | `rds-multi-az-mysql-cluster` | [Amazon RDS MySQL Multi-AZ DB Cluster Deployments](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) |
2223
| `RDS_MYSQL` | `rds-mysql` | Amazon RDS MySQL |
2324
| `MYSQL` | `mysql` | MySQL |
24-
| `AURORA_PG` | `aurora-pg` | Aurora PostgreSQL |
25+
| `AURORA_PG` | `aurora-pg` | [Aurora PostgreSQL](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_GettingStartedAurora.html) |
26+
| `GLOBAL_AURORA_PG` | `global-aurora-pg` | [Aurora Global Database PostgreSQL](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-getting-started.html) |
2527
| `RDS_MULTI_AZ_PG_CLUSTER` | `rds-multi-az-pg-cluster` | [Amazon RDS PostgreSQL Multi-AZ DB Cluster Deployments](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) |
2628
| `RDS_PG` | `rds-pg` | Amazon RDS PostgreSQL |
2729
| `PG` | `pg` | PostgreSQL |

docs/using-the-jdbc-driver/using-plugins/UsingTheAuroraInitialConnectionStrategyPlugin.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ When this plugin is enabled, if the initial connection is to a reader cluster en
55

66
This plugin also helps retrieve connections more reliably. When a user connects to a cluster endpoint, the actual instance for a new connection is resolved by DNS. During failover, the cluster elects another instance to be the writer. While DNS is updating, which can take up to 40-60 seconds, if a user tries to connect to the cluster endpoint, they may be connecting to an old node. This plugin helps by replacing the out of date endpoint if DNS is updating.
77

8+
In case of Aurora Global Database, a user has an option to use an [Aurora Global Writer Endpoint](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-connecting.html). Global Writer Endpoint makes a user application configuration easier. However, similar to a cluster writer endpoint mentioned above, it can also be affected by DNS updates. The Aurora Initial Connection Strategy Plugin recognizes an Aurora Global Writer Endpoint and substitutes it with a current writer endpoint.
9+
810
## Enabling the Aurora Initial Connection Strategy Plugin
911

1012
To enable the Aurora Initial Connection Strategy Plugin, add `initialConnection` to the [`wrapperPlugins`](../UsingTheJdbcDriver.md#connection-plugin-manager-parameters) value.

0 commit comments

Comments
 (0)