Update to handling of large records #1261
Open
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.
Code written by @davidxu8 (David Xu / Weidong Xu)
Oracle internally will handle records dynamically based on record size when passed the length in the setCharacterStream method. By doing this, customers on higher latency connections(>300ms round trip) and with record sizes that may vary above or below the varchar2(4000) limit experience a magnitude improvement in larger records. Additionally, small records on both higher latency and lower latency connections both with and without security and compression options enabled experience roughly the same performance as without this change.
Problem
Connectors handling large record sizes or those that vary above and below the varchar2(4000) limit experience notable performance degradation, especially on connections with higher latency connections due to the way Oracle DB handles large records (which is by disabling message batching). This can be validated by testing by comparing version 5.4.1 of this connector which handled all String fields as CLOBs versus the current version which handles all as varchar2(4000).
Solution
Adding the length field allows the Oracle side to figure out how to treat the record. This does not impact existing setups as it dynamically adds the sizing.
Does this solution apply anywhere else?
If yes, where?
Test Strategy
Testing done:
Release Plan
Reverting or rolling back from this version to a prior version is safe and has no impact on functionality, only performance.