Skip to content

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

karenc-bq
Copy link
Contributor

@karenc-bq karenc-bq commented May 28, 2025

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.

@karenc-bq karenc-bq force-pushed the fix/reuse-cached-reader-connection branch from d8edb18 to 9c321fc Compare May 28, 2025 07:50
Copy link

github-actions bot commented May 28, 2025

Qodana Community for JVM

It 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 report

To be able to view the detailed Qodana report, you can either:

  1. Register at Qodana Cloud and configure the action
  2. Use GitHub Code Scanning with Qodana
  3. Host Qodana report at GitHub Pages
  4. Inspect and use qodana.sarif.json (see the Qodana SARIF format for details)

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/[email protected]
        with:
          upload-result: true
Contact Qodana team

Contact us at [email protected]

@karenc-bq karenc-bq force-pushed the fix/reuse-cached-reader-connection branch from 9c321fc to 63e0d3c Compare May 28, 2025 15:21
@karenc-bq karenc-bq marked this pull request as ready for review May 28, 2025 15:21
@karenc-bq karenc-bq force-pushed the fix/reuse-cached-reader-connection branch from 31fb742 to 201c52c Compare May 29, 2025 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants