Skip to content

Commit

Permalink
fix: rename internal query timeout (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
karenc-bq authored Nov 15, 2024
1 parent 5fe6443 commit 22b7b0e
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 24 deletions.
4 changes: 2 additions & 2 deletions common/lib/wrapper_property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ export class WrapperProperties {
static readonly DIALECT = new WrapperProperty<string>("dialect", "A unique identifier for the supported database dialect.", null);

static readonly INTERNAL_QUERY_TIMEOUT = new WrapperProperty<number>(
"internal_query_timeout",
"Timeout in milliseconds for the wrapper to execute internal queries, such as the query for cluster topology",
"mysqlQueryTimeout",
"Timeout in milliseconds for the wrapper to execute queries against MySQL database engines",
20000
);

Expand Down
20 changes: 11 additions & 9 deletions docs/using-the-nodejs-wrapper/UsingTheNodejsWrapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,17 @@ To enable logging when using the AWS Advanced NodeJS Wrapper, use the `LOG_LEVEL

These parameters are applicable to any instance of the AWS Advanced NodeJS Wrapper.

| Parameter | Value | Required | Description | Default Value |
| ------------------------------ | --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `host` | `String` | No | Database host. | `null` |
| `database` | `String` | No | Database name. | `null` |
| `user` | `String` | No | Database username. | `null` |
| `password` | `String` | No | Database password. | `null` |
| `transferSessionStateOnSwitch` | `boolean` | No | Enables transferring the session state to a new connection. | `true` |
| `resetSessionStateOnClose` | `boolean` | No | Enables resetting the session state before closing connection. | `true` |
| `enableGreenHostReplacement` | `boolean` | No | Enables replacing a green node host name with the original host name when the green host DNS doesn't exist anymore after a blue/green switchover. Refer to [Overview of Amazon RDS Blue/Green Deployments](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments-overview.html) for more details about green and blue nodes. | `false` |
| Parameter | Value | Required | Description | Default Value |
| ------------------------------ | --------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `host` | `string` | No | Database host. | `null` |
| `database` | `string` | No | Database name. | `null` |
| `user` | `string` | No | Database username. | `null` |
| `password` | `string` | No | Database password. | `null` |
| `transferSessionStateOnSwitch` | `boolean` | No | Enables transferring the session state to a new connection. | `true` |
| `resetSessionStateOnClose` | `boolean` | No | Enables resetting the session state before closing connection. | `true` |
| `enableGreenHostReplacement` | `boolean` | No | Enables replacing a green node host name with the original host name when the green host DNS doesn't exist anymore after a blue/green switchover. Refer to [Overview of Amazon RDS Blue/Green Deployments](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments-overview.html) for more details about green and blue nodes. | `false` |
| `clusterInstanceHostPattern` | `string` | If connecting using an IP address or custom domain URL: Yes<br><br>Otherwise: No | This parameter is not required unless connecting to an AWS RDS cluster via an IP address or custom domain URL. In those cases, this parameter specifies the cluster instance DNS pattern that will be used to build a complete instance endpoint. A "?" character in this pattern should be used as a placeholder for the DB instance identifiers of the instances in the cluster. See [here](#host-pattern) for more information. <br/><br/>Example: `?.my-domain.com`, `any-subdomain.?.my-domain.com`<br/><br/>Use case Example: If your cluster instance endpoints follow this pattern:`instanceIdentifier1.customHost`, `instanceIdentifier2.customHost`, etc. and you want your initial connection to be to `customHost:1234`, then your client configuration should look like this: `{ host: "customHost", port: 1234, database: "test", clusterInstanceHostPattern: "?.customHost" }` | If the provided host is not an IP address or custom domain, the NodeJS Wrapper will automatically acquire the cluster instance host pattern from the customer-provided host. |
| `mysqlQueryTimeout` | `number` | No | Query timeout in milliseconds. This is only applicable when using the AwsMySQLClient. To set query timeout for the AwsPGClient, please use the built-in `query_timeout` parameter. See the `node-postgres` [documentation](https://node-postgres.com/apis/client) for more details.. | 20000 |

## Plugins

Expand Down
Loading

0 comments on commit 22b7b0e

Please sign in to comment.