-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
HHH-19708 prototype support for read/write replicas #10822
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
Conversation
1. allow a session to be created in a read-only mode 2. pass that mode through to the MultiTenantConnectionProvider
…replica This is better than throwing, because you might be using: - JDBC driver-level support for replicas, together with - true multi-tenancy
…ptions motivation for this in Javadoc
in case the MultiTenantConnectionProvider needs to access e.g. the TenantSchemaMapper
and remove an obsolete comment
d1821e6
to
8bd1595
Compare
a0d3476
to
29379e8
Compare
I have run into a problem here. The session often releases the connection back to the |
29379e8
to
9c9ecf0
Compare
Did you try moving the readOnly reset to |
I was looking at that option but then I realized I had kinda misdiagnosed the problem. The problem was really in the case when I didn't start any tx at all. OTOH, I'm not sure how much I care about that case. Seems to work when I do start/end a tx. |
I think this is now a good-enough start to be useful for people to play around and experiment with. Everything is marked So I'm going to merge this. There's absolutely nothing here which is hard to roll back. |
Rebase of #10754
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.
https://hibernate.atlassian.net/browse/HHH-19708