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

Pipelining for Oracle Client #1434

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sudaraka94
Copy link

@sudaraka94 sudaraka94 commented Apr 17, 2024

fixes #1352

Motivation:

Since release 23C, Oracle started supporting pipelined operations (ref). This PR adds pipelined execution support for vertx-oracle-client

Conformance:

You should have signed the Eclipse Contributor Agreement as explained in https://github.com/eclipse/vert.x/blob/master/CONTRIBUTING.md
Please also make sure you adhere to the code style guidelines: https://github.com/vert-x3/wiki/wiki/Vert.x-code-style-guidelines

@sudaraka94 sudaraka94 marked this pull request as ready for review April 17, 2024 16:03
@sudaraka94 sudaraka94 marked this pull request as draft April 17, 2024 16:03
@sudaraka94
Copy link
Author

I have implemented tests in #1434 1769e9f using PipeliningQueryTestBase.java. I'm facing this issue with this test case. In this test case, it prepares and executes different queries in a loop. It expects the prepare+execute operations to get executed in order. but with my implementation it doesn't get executed in order. Im trying to fix this issue

@vietj
Copy link
Member

vietj commented May 3, 2024

@sudaraka94 how is going your investigation with the prepare+execute case ?

@sudaraka94
Copy link
Author

Hello @vietj I sent you an email with the info, let me add it here as well.

Right now I have implemented pipelining and tests (by extending PipeliningQueryTestBase). But there were a few test failures and I spent some time trying to understand why. But I think I might need some help in figuring out whether we should fix the tests or ignore them. Let me summarize the concerns I am having below,

  1. I ignored the following test cases since Oracle doesn't support making batch queries.
  • testOneShotPreparedBatchQueryConn
  • testOneShotPreparedBatchQueryPool
  1. I was looking into the code and I noticed that the Oracle Client doesn't cache Prepared Statements (unlike mysql client). But I'm not really sure what is the reason behind this. Wanted to check with you whether we should implement PS caching or just ignore following tests
  • testContinuousOneShotCachedPreparedQueryWithSameSqlUsingConn
  • testContinuousOneShotCachedPreparedQueryWithSameSqlUsingPoolWithSingleConn
  • testContinuousOneShotCachedPreparedQueryWithDifferentSqlUsingConn
  • testContinuousOneShotCachedPreparedQueryWithDifferentSqlUsingPoolWithSingleConn
  1. Following tests are failing due to Oracle client not preserving order when returning results. Looking into how the simple sql queries work underneath in Oracle client, I noticed that it always executes a prepare command for creating a prepared statement before executing the actual query and during these two steps the ordering gets messed up (I debugged adding some logs). Wanted to check with you on the reason why the normal oracle queries execute the prepare command before executing the query and whether we need to provide the ordering guarantee in the oracle client during pipelining? Here are the tests that are failing due to ordering issues,
  • testContinuousSimpleQueryUsingConn
  • testContinuousSimpleQueryUsingPoolWithSingleConn
  • testContinuousOneShotPreparedQueryUsingConn
  • testContinuousOneShotPreparedQueryUsingPoolWithSingleConn
  • testPrepareAndExecuteWithDifferentSql
  1. And I noticed you introduced a change to pause the pipeline when executing prepared statements in sql client on this PR and wanted to check with you the reason behind this and whether we should implement the same in the Oracle Client pipelining.

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.

Oracle pipelining
2 participants