-
Notifications
You must be signed in to change notification settings - Fork 938
Remove support for lastStreamToken #3132
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
Conversation
c38dff8
to
44731f9
Compare
Binary Size ReportAffected SDKs
Test Logs |
// operation failed and we fail the pending operation. | ||
if (error && this.writeStream.handshakeComplete) { | ||
// This error affects the actual write. | ||
await this.handleWriteError(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.
We're still tracking the lastStreamToken
and it's possible that if we're restarting the write stream after some successful writes, the server could reject the stream token we supply. This means we still need to handle the handshake 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.
I'll add the handshake code back if you prefer (it might be safer to reduce the churn here), but what do you think about the fix in b530cd5?
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.
I have no strong preference on the general strategy, though it seems like clearing when the stream starts could be more bullet proof.
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.
I modified it to match the assignment of handshakeComplete_
, which is now true only if the stream token is non empty.
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.
LGTM
This extracts the Stream Token removal from #2995 into a separate PR, so it can be more easily reverted should the backend add full support for the stream tokens.
We are removing the Stream Tokens to ease IndexedDB recovery.
Proof of concept PR that implements IndexedDB recovery with Stream Tokens: #3131