Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Store error on transaction stream #248

Merged
merged 3 commits into from
Jan 21, 2022

Conversation

flyingsilverfin
Copy link
Member

@flyingsilverfin flyingsilverfin commented Jan 21, 2022

What is the goal of this PR?

We store any exceptions received against the transaction stream (as well as query streams) in order to propagate the error to any future transaction operations, not just open query streams.

What are the changes implemented in this PR?

  • store errors against query streams and transaction streams, so we can error on transaction operations against a closed transaction

@flyingsilverfin flyingsilverfin changed the title Store error on transaction stream and clean up queues Store error on transaction stream and remove completed query queues Jan 21, 2022
@flyingsilverfin flyingsilverfin changed the title Store error on transaction stream and remove completed query queues Store error on transaction stream and clean up completed query state Jan 21, 2022
@flyingsilverfin flyingsilverfin changed the title Store error on transaction stream and clean up completed query state Store error on transaction stream Jan 21, 2022
@flyingsilverfin flyingsilverfin marked this pull request as ready for review January 21, 2022 15:15
@flyingsilverfin flyingsilverfin added this to the Technical Debt milestone Jan 21, 2022
@flyingsilverfin flyingsilverfin merged commit 3375f80 into typedb:master Jan 21, 2022
@flyingsilverfin flyingsilverfin deleted the tx-stream-error branch January 21, 2022 16:32
flyingsilverfin added a commit that referenced this pull request Mar 22, 2022
## What is the goal of this PR?

Revert previous changes from #247 and #248, which made query queues and iterators throw the same error idempotently. However, this goes counter to standard usage of iterators and queues, which are not meant to behave idempotently (each item is only returned once, and if they have an error they should no longer be used). 


## What are the changes implemented in this PR?

* remove idempotent error state of collectors and queues, which back query iterators
  * note that we still store the error on the transaction bidirectional stream, in case the server throws an exception when there are no query iterators active
  

Note: mirrors change from typedb/typedb-driver#372
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants