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

feat: execute INFORMATION_SCHEMA in single-use transaction #276

Merged

Conversation

olavloite
Copy link
Collaborator

Queries referencing the INFORMATION_SCHEMA must use a single-use read-only
transaction. If such a query is executed during a (read/write) transaction, it
will return a specific error. This error is now detected by PGAdapter and the
query is retried in a separate single-use read-only transaction.

This behavior is needed for TypeORM.

Queries referencing the INFORMATION_SCHEMA must use a single-use read-only
transaction. If such a query is executed during a (read/write) transaction, it
will return a specific error. This error is now detected by PGAdapter and the
query is retried in a separate single-use read-only transaction.

This behavior is needed for TypeORM.
@codecov
Copy link

codecov bot commented Jul 11, 2022

Codecov Report

Merging #276 (b614da6) into postgresql-dialect (b80069d) will increase coverage by 0.05%.
The diff coverage is 94.73%.

@@                   Coverage Diff                    @@
##             postgresql-dialect     #276      +/-   ##
========================================================
+ Coverage                 82.48%   82.53%   +0.05%     
- Complexity                 1293     1294       +1     
========================================================
  Files                       106      107       +1     
  Lines                      4476     4495      +19     
  Branches                    550      553       +3     
========================================================
+ Hits                       3692     3710      +18     
- Misses                      599      600       +1     
  Partials                    185      185              
Flag Coverage Δ
all_tests 82.53% <94.73%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ogle/cloud/spanner/connection/ResultSetHelper.java 50.00% <50.00%> (ø)
...panner/pgadapter/statements/BackendConnection.java 90.93% <100.00%> (+0.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b80069d...b614da6. Read the comment docs.

@olavloite olavloite merged commit fa7fe13 into postgresql-dialect Jul 16, 2022
@olavloite olavloite deleted the retry-information-schema-queries-in-transaction branch July 16, 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.

1 participant