Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Improve Error Handling and API Usability for Stream Operations

Aperta
#691 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
api, databases

Direzione di ricerca

Start at the Python SDK's session.transaction().execute() entry point and trace how its response stream is consumed. Determine how incomplete consumption is detected and what runtime warning behavior is appropriate. Done means incomplete streams that may contain errors are surfaced instead of silently producing successful no-ops; the issue also suggests documenting the consumption requirement.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Feature Request

Describe the Feature Request

The current implementation of stream operations in the YDB Python SDK (specifically for session.transaction().execute()) allows users to execute queries without properly consuming the response stream. This can lead to silent failures where:

  • Queries (especially UPSERT operations) appear to execute successfully (no exceptions raised)
  • Data is not actually persisted in the database
  • No warnings or errors are logged to indicate incomplete operation
  • The root cause is difficult to diagnose (users must be aware of internal stream mechanics)

Describe Preferred Solution

Implement runtime warnings when:

  • A stream is not fully consumed and may have errors.

Describe Alternatives

Improve documentation to emphasize stream consumption requirements

Related Code

with ydb.QuerySessionPool(driver) as pool:
with pool.checkout() as session:
    session.transaction(tx_mode=ydb.QuerySerializableReadWrite()).execute(
        query=query_to_upsert,
        parameters={
            "$data": ydb.TypedValue(data_to_upsert, ydb.ListType(TestSerialStruct))
        },
        commit_tx=True,
    )

Additional Context
The API should prevent "successful no-ops" through:

If the feature request is approved, would you be willing to submit a PR?
No

Lingua principale
Python
Stelle
102
Fork
75
Merge medio
1g 23h
PR unite (30g)
13

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ydb-platform/ydb-python-sdk

Tutte le issue di ydb-platform/ydb-python-sdk

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.