-
Notifications
You must be signed in to change notification settings - Fork 288
Yingjianw/aurora jdbc #658
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
base: master
Are you sure you want to change the base?
Conversation
5ff874e
to
5712246
Compare
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.
All in all LGTM! Just a few questions and nits.
* @param env Spring Environment | ||
* @param isAuroraEnabled isAuroraEnabled | ||
*/ | ||
public MetacatProperties(final Environment env, final boolean isAuroraEnabled) { |
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.
nit: It might be good to add a new constructor rather than changing the existing one. I think you can keep the original and just proxy that through to this one, with isAuroraEnabled
set to null. I think that would decrease the change's footprint.
facets { | ||
functionalTest { | ||
parentSourceSet = "test" | ||
includeInCheckLifecycle = true | ||
testTaskName = 'functionalTestWithDifferentDB' | ||
includeInCheckLifecycle = false |
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.
Why are we switching the value of includeInCheckLifecycle
?
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.
the reason is
./gradlew clean build will run the functional test
but we already have an action for
./gradlew clean build functionalTest in our github action
@@ -61,21 +64,29 @@ public void deleteDatabase(final String dbName) { | |||
} | |||
|
|||
@Override | |||
@Transactional(propagation = Propagation.SUPPORTS) | |||
@Transactional(propagation = Propagation.REQUIRED) |
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.
Why are we shifting these to REQUIRED?
*/ | ||
protected <T> Slice<T> getAllDatabasesForCurrentPage( | ||
final String dbNamePrefix, final Pageable page, final boolean selectAllColumns) { | ||
return null; |
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.
nit: Might be good to throw a NotImplemented exception here.
return (List<PolarisDatabaseEntity>) dbRepo.getAllDatabases(dbNamePrefix, sort, pageSize, true); | ||
final int pageSize, | ||
final boolean isAuroraEnabled) { | ||
return (List<PolarisDatabaseEntity>) |
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.
nit: I'd recommend adding a function like getDBRepo(isAuroraEnabled)
and getTblRepo(isAuroraEnabled)
that return BasePolarisDatabaseReplicaRepository
and BasePolarisTableReplicaRepository
respectively. Then you can do the ternary operator there and return the appropriate value and just call getAllDatabases
on the return value. It might simplify the code a little bit.
rebase wip wip wip Asda Asda Asda asda asda asda asda asda asda asda asda asda asda asda asda asda asda asda asda asda asda asda asda Adas Adas Adas Adas Adas Adas Adas wip wip wip Adas wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip wip
be30382
to
3ac4408
Compare
Set Up Aurora Storage for Metacat
Overview
This PR sets up Aurora storage for Metacat, introducing several key changes to ensure compatibility and performance.
Changes
JDBC Template for Aurora Reader
entityManager
doesn't support twoentityManagers
pointing to the same entity, where it looks like it is always the primary entityManager will be used, which means the replica won't be used in this case.entityManager
is sufficient, usingread_follower
in SQL queries to route to replicas.metacat-connector-polaris
.Aurora Compatibility and Control Flag
metacat-common-server/src
.Functional Test Refactoring
functionalTest
undermetacat-connector-polaris
.Functional Tests for CRDB and Aurora
metacat-functional-tests
.Some minor improvements to allow test report to be downloadable for debugging purposes