CE-177 - when the HTTP2Stream is terminated from the remote server handle the close by cleaning up local state and firing an abort error. - #639
Draft
doom-weaver wants to merge 4 commits into
Draft
Conversation
doom-weaver
marked this pull request as draft
June 3, 2022 13:44
…he associated Http2Stream
doom-weaver
removed request for
henryfauna,
ldavulur,
rts-rob and
trevor-fauna
October 4, 2022 15:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notes
Jira Ticket
We have implemented an Http2Adapter in the client which wraps up interaction with Node's underlying HTTP2 library: https://nodejs.org/api/http2.html
This code addresses a bug in the wrapper such that:
This fix addresses this issue by handling
closeevents fired off by the remote server such that our adapter's internal state is appropriately updated.Note that we should only handle these events if two conditions are met:
errorevent is not being fired (which we can detect via therstCode) (see herestate.remoteCloseproperty. (see here)How to test
yarn testand also we setup a Lambda to simulate the server remotely closing the connection by spinning up an AWS Lambda querying Fauna on a regular cadence. The Fauna cluster being queried is having its hosts constantly cycled such that we can reproduce the issue. With this change, the scenario now results in an error to the client, rather than a silent hang.I can provide a link to the integration test in question.