Skip to content
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

[OSS-ONLY] Update JDBC Framework to run under a single connection #3240

Open
wants to merge 18 commits into
base: BABEL_5_X_DEV
Choose a base branch
from

Conversation

KushaalShroff
Copy link
Contributor

@KushaalShroff KushaalShroff commented Dec 12, 2024

Description

With this commit we enforce JDBC framework to use and keep re-using only 1 connection through it's entirety. We enable this only for non-upgrade tests for now.
To do so we execute the sp_reset_connection after each test file, using the same connection object. In case of crossdialect files (.mix) we still keep reusing the the same connection unless the user has specified their own --tsql/--psql connections.
While enabling this we encountered a lot of bugs which we fixed and add explicit tests under Test-sp_reset_connection.mix but there are other issues that using one connections bring with it like the drawback of not able to unload pg_hint_plan from the current session and other bugs. To avoid them from failing we update these test files as .mix files with their own "--tsql" connection which gets disconnected at the end of the file.

Issues Resolved

BABEL-5255

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@coveralls
Copy link
Collaborator

coveralls commented Dec 12, 2024

Pull Request Test Coverage Report for Build 12505594390

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 5 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.001%) to 74.854%

Files with Coverage Reduction New Missed Lines %
contrib/babelfishpg_tsql/src/pl_funcs.c 2 18.95%
contrib/babelfishpg_tsql/src/pl_funcs-2.c 3 45.82%
Totals Coverage Status
Change from base Build 12502179127: -0.001%
Covered Lines: 46568
Relevant Lines: 62212

💛 - Coveralls

@KushaalShroff KushaalShroff changed the title Update JDBC Framework to run under a single connection [OSS-ONLY] Update JDBC Framework to run under a single connection Dec 17, 2024
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