Skip to content
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

fix: mysql support #115

Merged
merged 4 commits into from
Sep 18, 2023
Merged

fix: mysql support #115

merged 4 commits into from
Sep 18, 2023

Conversation

karenc-bq
Copy link
Contributor

Description

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@karenc-bq karenc-bq force-pushed the failover_with_mysql branch 4 times, most recently from 0dc017f to 66dd82a Compare September 1, 2023 18:38
@@ -54,7 +54,7 @@ jobs:

- name: 'Run Integration Tests'
run: |
./gradlew --no-parallel --no-daemon test-all-environments --info
./gradlew --no-parallel --no-daemon test-mysql-aurora --info
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Temporary change to run integration tests

@karenc-bq karenc-bq force-pushed the failover_with_mysql branch 7 times, most recently from 0863fd1 to 10a864a Compare September 11, 2023 17:19
@karenc-bq karenc-bq changed the base branch from main to mysql-integration September 11, 2023 17:21
@karenc-bq karenc-bq force-pushed the mysql-integration branch 3 times, most recently from d9a3ff4 to 0827b5b Compare September 11, 2023 22:22
@karenc-bq karenc-bq closed this Sep 12, 2023
@karenc-bq karenc-bq reopened this Sep 12, 2023
]

def is_network_exception(self, error: Optional[Exception] = None, sql_state: Optional[str] = None) -> bool:
if isinstance(error, QueryTimeoutError):
Copy link
Contributor

Choose a reason for hiding this comment

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

Does MySQL have a ConnectionTimeoutError that we should check for like PG? Or is the connection timeout caught in the logic below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -55,6 +55,16 @@ class FailoverPlugin(Plugin):
"force_connect",
"notify_host_list_changed"}

_METHODS_REQUIRE_UPDATED_TOPOLOGY: Set[str] = {
"Connection.commit",
Copy link
Contributor

Choose a reason for hiding this comment

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

how did we come up with this method list, and why is it necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mysql specific thing awslabs/aws-mysql-jdbc#364

@@ -408,6 +419,9 @@ def _allowed_on_closed_connection(method_name: str):
method_name == "Connection.getSchema" or \
method_name == "Connection.getTransactionIsolation"

def _can_update_topology(self, method_name: str):
Copy link
Contributor

Choose a reason for hiding this comment

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

would _requires_topology_update be a more accurate name? to me can_update_topology makes it sound like the methods listed above (commit, rollback etc) can cause a topology update in and of themselves

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense

aws_wrapper/resources/messages.properties Outdated Show resolved Hide resolved
tests/integration/container/conftest.py Show resolved Hide resolved
@karenc-bq karenc-bq merged commit 298f94f into mysql-integration Sep 18, 2023
4 checks passed
@karenc-bq karenc-bq deleted the failover_with_mysql branch September 18, 2023 23:05
karenc-bq added a commit that referenced this pull request Sep 20, 2023
karenc-bq added a commit that referenced this pull request Sep 22, 2023
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.

2 participants