-
Notifications
You must be signed in to change notification settings - Fork 33
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
Store error on transaction stream #368
Store error on transaction stream #368
Conversation
else { | ||
state = State.EMPTY; | ||
return next; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we make the next() idempotently throw the same error if the user repeatedly calls it
@@ -108,6 +111,7 @@ public void close() { | |||
|
|||
private void close(@Nullable StatusRuntimeException error) { | |||
if (isOpen.compareAndSet(true, false)) { | |||
this.error = error; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
store the closure error against the bidirectional stream to prevent future transaction operations
## What is the goal of this PR? We revert previous changes from #368 and #364, which made query queues and iterators throw the same error idempotently if there was one. However, this goes counter to standard usages 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
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?