Skip to content

Use new core framework r2dbc support #22708

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

Closed
snicoll opened this issue Aug 3, 2020 · 2 comments
Closed

Use new core framework r2dbc support #22708

snicoll opened this issue Aug 3, 2020 · 2 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@snicoll
Copy link
Member

snicoll commented Aug 3, 2020

As of Spring Framework 5.3, the core framework has some dedicated r2dbc support. This has an impact on spring-data-r2dbc (see spring-projects/spring-data-r2dbc#368) which needs some harmonisation in the auto-configuration as well.

@snicoll snicoll self-assigned this Aug 3, 2020
@snicoll snicoll added the type: enhancement A general enhancement label Aug 3, 2020
@snicoll snicoll added this to the 2.4.0-M2 milestone Aug 3, 2020
snicoll added a commit to snicoll/spring-boot that referenced this issue Aug 3, 2020
@snicoll
Copy link
Member Author

snicoll commented Aug 3, 2020

I found something that's potentially annoying. There are a number of places where we use the DatabaseClient and the ConnectionFactory. The latter is used to fetch the dialect to use.

At the moment we inject a ConnectionFactory and we create a DatabaseClient that we reuse down the road and we back-off if a DatabaseClient is already created. This reduces the chances that the ConnectionFactory and the DatabaseClient bean do not match.

With the split, this creation is totally separated and independent of Spring Data so the bits that need to get the dialect are using the ConnectionFactory but we have no guarantee that it matches the DatabaseClient bean.

@mp911de
Copy link
Member

mp911de commented Aug 4, 2020

DatabaseClient that is used with R2dbcEntityOperations must be configured to match the desired database system. We have a similar arrangement with Spring Data JDBC. If a Datasource points to e.g. MySQL but the dialect is Postgres, then the configuration will not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants