-
Notifications
You must be signed in to change notification settings - Fork 59
fix: add expiration time for cached reader connections #1422
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: main
Are you sure you want to change the base?
Conversation
d8edb18
to
9c321fc
Compare
Qodana Community for JVMIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either:
To get - name: 'Qodana Scan'
uses: JetBrains/[email protected]
with:
upload-result: true Contact Qodana teamContact us at [email protected]
|
9c321fc
to
63e0d3c
Compare
...r/src/main/java/software/amazon/jdbc/plugin/readwritesplitting/ReadWriteSplittingPlugin.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/software/amazon/jdbc/plugin/readwritesplitting/ReadWriteSplittingPlugin.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/software/amazon/jdbc/plugin/readwritesplitting/ReadWriteSplittingPlugin.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/software/amazon/jdbc/plugin/readwritesplitting/ReadWriteSplittingPlugin.java
Outdated
Show resolved
Hide resolved
31fb742
to
201c52c
Compare
Summary
If connection pool isn't used, the read/write splitting plugin caches the reader connection forever, all read operations will be redirected to a single instance when
setReadOnly(true)
is called. This may impede performance.This PR provides a connection parameter allowing user applications to redirect read operations to other instances after certain expiration time.
Description
Additional Reviewers
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.