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

chore: loosen restrictions setRetryAbortsInternally #2924

Merged

Conversation

olavloite
Copy link
Collaborator

Calling setRetryAbortsInternally(boolean) was unnecessarily strict, as there is no reason why it should be disallowed to change the value while in auto-commit mode and/or read-only mode. The fact that the flag does not have any direct impact on those modes, does not mean that it should be disallowed to set the value.

The fact that it was impossible to set the value while in auto-commit mode, also means that it is impossible to disable it using a startup command for a PostgreSQL connection to PGAdapter, as PGAdapter creates connections in auto-commit mode.

Calling setRetryAbortsInternally(boolean) was unnecessarily strict, as there
is no reason why it should be disallowed to change the value while in
auto-commit mode and/or read-only mode. The fact that the flag does not have
any direct impact on those modes, does not mean that it should be disallowed
to set the value.

The fact that it was impossible to set the value while in auto-commit mode,
also means that it is impossible to disable it using a startup command for
a PostgreSQL connection to PGAdapter, as PGAdapter creates connections in
auto-commit mode.
@olavloite olavloite requested a review from a team as a code owner February 23, 2024 11:46
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: spanner Issues related to the googleapis/java-spanner API. labels Feb 23, 2024
@olavloite olavloite requested a review from a team as a code owner February 23, 2024 11:49
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Feb 23, 2024
@olavloite olavloite merged commit cf865f8 into main Feb 29, 2024
25 of 28 checks passed
@olavloite olavloite deleted the loosen-restrictions-on-setting-retry-aborts-internally branch February 29, 2024 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants