Skip to content

chore: add a table for exception codes #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 11, 2022
Merged

chore: add a table for exception codes #46

merged 2 commits into from
Aug 11, 2022

Conversation

karenc-bq
Copy link
Contributor

Summary

chore: add a table for exception codes

Additional Reviewers

@sergiyvamz

@@ -34,6 +34,13 @@ In addition to the parameters that you can configure for the underlying driver,
When connecting to Aurora clusters, the [`clusterInstanceHostPattern`](#failover-parameters) parameter is required when the connection string does not provide enough information about the database cluster domain name. If the Aurora cluster endpoint is used directly, the 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 wrapper 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 wrapper would need to know how to construct the instance endpoints using the specified custom domain. Because there isn't enough information from the custom domain alone to create the instance endpoints, the `clusterInstanceHostPattern` should be set to `?.customHost`, making the connection string `jdbc:aws-wrapper:postgresql://customHost:1234/test?clusterInstanceHostPattern=?.customHost`. Refer to [this diagram](../../images/failover_behavior.png) on JDBC Wrapper behavior during failover for different connection URLs for more details and examples.

## Failover Exception Codes

| Exceptions | Is the connection valid? | Can the connection be reused? | Has the session state changed? | Does the session need to be reconfigured? | Does the last statement need to be re-executed | Does the transaction need to be restarted |
| ------------------------------------------ | ------------------------ | ----------------------------- | ------------------------------ | ----------------------------------------- | ---------------------------------------------- | ----------------------------------------- |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we need to add more columns/questions then the table gets wider that makes it unreadable. Does it makes sense to pivot the table?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to transpose the table but I think this version is more readable. If we do decide to add columns I think we should look for a better representation than using table.

@karenc-bq karenc-bq merged commit 804e190 into main Aug 11, 2022
@karenc-bq karenc-bq deleted the exception_codes branch August 11, 2022 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants