Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This branch updates the Oracle JDBC dependency to 23.4, and adds support for pipelined database calls.
Changes in the README explain what pipelining is, what is required to use it.
The biggest change for the Oracle R2DBC code base is the use of AsyncLock. The 21.x releases of Oracle JDBC would block threads that attempted to make concurrent database calls. The AsyncLock was devised as a way to avoid this locking (and the possibility of dead-locking that came with it). The 23.4 release of Oracle JDBC does away with this locking. That was a key change required to support pipelining.
In this branch, AsyncLock becomes an interface with two concrete implementations:
Oracle R2DBC will now check the major version of Oracle JDBC at runtime, and then decide which AsyncLock it needs to use: 23 or newer? Then NoOpAsyncLock. Otherwise, AsyncLockImpl.
Arguably, we could delete AsyncLock entirely. A strict dependency on 23.4 should mean that Oracle R2DBC no longer needs to support the older versions of Oracle JDBC. I've opted to leave support for the 21.x Oracle JDBC Driver in place for now. I think there may be some value for users in this, as it provides time for a transition from 21 to 23. The new 23 version has some changes which are known to break existing applications; In fact they broke some existing test cases for Oracle R2DBC (you can see the changes in this PR). Given that Oracle R2DBC was already designed to work the 21 driver, we can continue to support at almost no development cost. We will want to drop support for 21 at some point, but I see no need to rush.
A potentially performance impacting change has "zero copy IO" disabled by default. This is necessary to workaround a known issue where the database does not respond to pipelined calls that result in an error, and that use zero copy IO for bind values. Notably, zero copy IO is used for JSON and VECTOR bind values. Disabling this performance optimization seemed like a better option than not supporting pipelining, or not supporting JSON and VECTOR.