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
spanner-jdbc: Metadata queries should be allowed during a DDL batch #6939
spanner-jdbc: Metadata queries should be allowed during a DDL batch #6939
Conversation
A DDL batch would refuse any query that would be executed during an active batch. This causes problems for frameworks, such as Hibernate, that might execute such queries during datamodel generation to check which database objects (tables, indices, ...) already exist in the database. This change will allow specifically internally generated metadata queries to be executed during a DDL batch. All other queries will still be refused. The metadata queries will be executed using a single use read-only transaction.
Codecov Report
@@ Coverage Diff @@
## master #6939 +/- ##
============================================
+ Coverage 41.04% 41.18% +0.13%
- Complexity 5289 5310 +21
============================================
Files 360 360
Lines 50413 50436 +23
Branches 6913 6918 +5
============================================
+ Hits 20692 20770 +78
+ Misses 28244 28182 -62
- Partials 1477 1484 +7
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thank you, this is very helpful!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
A DDL batch would refuse any query that would be executed during an active batch. This causes problems for frameworks, such as Hibernate, that might execute such queries during datamodel generation to check which database objects (tables, indices, ...) already exist in the database. This change will allow specifically internally generated metadata queries to be executed during a DDL batch. All other queries will still be refused. The metadata queries will be executed using a
single use read-only transaction.