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

vdk-oracle: ORA-01002: fetch out of sequence error in _cache_tables when some rows fail to ingest #2932

Open
DeltaMichael opened this issue Nov 22, 2023 · 0 comments
Labels
bug Something isn't working initiative: VDK Oracle VDK Oracle support
Milestone

Comments

@DeltaMichael
Copy link
Contributor

DeltaMichael commented Nov 22, 2023

Overview

While doing load testing, this error was happening sporadically and failing for 1% of ingestion rows. It might be due to unnecessary commit calls.

https://github.com/vmware/versatile-data-kit/blob/main/projects/vdk-plugins/vdk-oracle/src/vdk/plugin/oracle/ingest_to_oracle.py#L164

We probably don't need this commit call, because of commit being called on connection close anyway.

https://github.com/vmware/versatile-data-kit/blob/main/projects/vdk-plugins/vdk-oracle/src/vdk/plugin/oracle/oracle_connection.py#L56

This has to be tested, however.

How to reproduce

  1. Remove this try-except
  2. Ingest 1 000 000 records using a functional test where you generate the table id in python code, e.g.
for i in range(1000000):
    p = payload.copy()
    p["id"] = i
    job_input.send_object_for_ingestion(
        payload=p, destination_table="test_table"
    )
  1. Check result logs for ORA-01002

Acceptance criteria

  1. Reproduce the bug and fix it
  2. Remove the extra commit call and test that everything else works correctly
@DeltaMichael DeltaMichael added the bug Something isn't working label Nov 22, 2023
@DeltaMichael DeltaMichael added this to the VDK Oracle milestone Nov 22, 2023
DeltaMichael added a commit that referenced this issue Nov 24, 2023
## Why?
    
In order to support more use cases, vdk should support connecting and
ingesting to an oracle database
    
## What?
    
Add oracle plugin. Plugin supports simple queries, cli queries and
ingestion.
    
## How was this tested?
    
Local functional tests, CI tests are part of a separate task
    
## What kind of change is this?
    
Feature/non-breaking
    
## Follow-up

[Set up testcontainers for
CI](#2928)
[Support type inference when
ingesting](#2929)
[Support passing math.nAn and None for
ingestion](#2930)
[Optimize batching of payload rows with different
keysets](#2931)
[ORA-01002: fetch out of sequence error in _cache_tables when some rows
fail to
ingest](#2932)
[Further load
testing](#2933)
[Investigate possible
segfaults](#2934)

Signed-off-by: Dilyan Marinov <[email protected]>
Co-authored-by: Antoni Ivanov <[email protected]>
@stefan-pulov stefan-pulov added the initiative: VDK Oracle VDK Oracle support label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working initiative: VDK Oracle VDK Oracle support
Projects
None yet
Development

No branches or pull requests

2 participants