Skip to content

Commit aae443b

Browse files
committed
Remove deprecated configuration parameters (#1577)
1 parent 68360cf commit aae443b

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ In addition to the parameters that you can configure for the underlying driver,
3636
| `failoverWriterReconnectIntervalMs` | Integer | No | Interval of time in milliseconds to wait between attempts to reconnect to a failed writer during a writer failover process. | `2000` |
3737
| `enableConnectFailover` | Boolean | No | Enables/disables cluster-aware failover if the initial connection to the database fails due to a network exception. Note that this may result in a connection to a different instance in the cluster than was specified by the URL. | `false` |
3838
| `skipFailoverOnInterruptedThread` | Boolean | No | Enable to skip failover if the current thread is interrupted. This may leave the Connection in an invalid state so the Connection should be disposed. | `false` |
39-
| ~~`keepSessionStateOnFailover`~~ | Boolean | No | This parameter is no longer available. If specified, it will be ignored by the driver. See [Session State](../SessionState.md) for more details. | `false` |
40-
| ~~`enableFailoverStrictReader`~~ | Boolean | No | This parameter is no longer available and, if specified, it will be ignored by the driver. See `failoverMode` (`reader-or-writer` or `strict-reader`) for more details. | |
4139

4240
## Host Pattern
4341
When connecting to Aurora clusters, the [`clusterInstanceHostPattern`](#failover-parameters) parameter is required if the connection string does not provide enough information about the database cluster domain name. If the Aurora cluster endpoint is used directly, the AWS Advanced JDBC Wrapper will recognize the standard Aurora domain name and can re-build a proper Aurora instance name when needed. In cases where the connection string uses an IP address, a custom domain name, or localhost, the driver won't know how to build a proper domain name for a database instance endpoint. For example, if a custom domain was being used and the cluster instance endpoints followed a pattern of `instanceIdentifier1.customHost`, `instanceIdentifier2.customHost`, etc., the driver would need to know how to construct the instance endpoints using the specified custom domain. Since there isn't enough information from the custom domain alone to create the instance endpoints, you should set the `clusterInstanceHostPattern` to `?.customHost`, making the connection string `jdbc:aws-wrapper:postgresql://customHost:1234/test?clusterInstanceHostPattern=?.customHost`. Refer to [this diagram](../../images/failover_behavior.png) about AWS Advanced JDBC Wrapper behavior during failover for different connection URLs and more details and examples.

examples/SpringTxFailoverExample/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,8 @@ spring:
127127
max-lifetime: 1260000
128128
auto-commit: false
129129
maximum-pool-size: 3
130-
data-source-properties:
131-
keepSessionStateOnFailover: true
132130
```
133131
134-
Please also note the use of the [`keepSessionStateOnFailover`](https://github.com/aws/aws-advanced-jdbc-wrapper/blob/main/docs/using-the-jdbc-driver/using-plugins/UsingTheFailoverPlugin.md#failover-parameters) property. When failover occurs, the connection's auto commit value is reset to true. When the auto commit value is set to false or transactions are used, further operations such as a rollback or commit on the same connection will cause errors. This parameter is used when connections cannot be reconfigured manually as seen in this [example](https://github.com/aws/aws-advanced-jdbc-wrapper/tree/main/examples/AWSDriverExample/src/main/java/software/amazon/PgFailoverSample.java).
135-
136132
## Step 4: Set up a data access object
137133
138134
Set up a simple data access object (DAO) interface and implementation. The data access object will be responsible for executing any queries. In this tutorial, only a get method will be included, but other methods are available within the sample code.

examples/SpringTxFailoverExample/src/main/resources/application.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ spring:
99
max-lifetime: 1260000
1010
auto-commit: false
1111
maximum-pool-size: 3
12-
data-source-properties:
13-
keepSessionStateOnFailover: true
12+

wrapper/src/test/java/integration/container/tests/FailoverTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,11 +505,11 @@ public void test_takeOverConnectionProperties() throws SQLException {
505505

506506
/**
507507
* Current writer dies, a reader instance is nominated to be a new writer, failover to the new
508-
* writer. Autocommit is set to false and the keepSessionStateOnFailover property is set to true.
508+
* writer. Autocommit is set to false.
509509
*/
510510
@TestTemplate
511511
@EnableOnNumOfInstances(min = 2)
512-
public void test_failFromWriterWhereKeepSessionStateOnFailoverIsTrue() throws SQLException {
512+
public void test_failFromWriter() throws SQLException {
513513

514514
final String initialWriterId = this.currentWriter;
515515
TestInstanceInfo initialWriterInstanceInfo =

0 commit comments

Comments
 (0)