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

Update to handling of large records #1261

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Xytam
Copy link

@Xytam Xytam commented Oct 26, 2022

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?
  • yes
  • no
If yes, where?

Test Strategy

Testing done:
  • Unit tests
  • Integration tests
  • System tests
  • Manual tests

Release Plan

Reverting or rolling back from this version to a prior version is safe and has no impact on functionality, only performance.

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.
@Xytam Xytam requested a review from a team as a code owner October 26, 2022 19:36
@CLAassistant
Copy link

CLAassistant commented Oct 26, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

UPSERT ended up crashing this section of code and we tested this fix to ensure that it does not crash when UPSERT is used now.
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