Repository navigation
Keep a delivery going when the exception reporter raises for one stream - #743
Open
koic wants to merge 1 commit into
Conversation
## Motivation and Context A notification is written to one stream after another, and a write that fails on a stream is reported through the exception reporter before that stream is removed. A reporter that raised there ended the whole delivery: the failed stream stayed registered, the streams the delivery had not reached yet never received the notification, and the exception went to the code that emitted the change. The report of a failed stream write now ignores a reporter that raises, on both paths that write to several streams: the `subscriptions/listen` streams and the streams of the sessions. The failed stream is removed as before, and the delivery continues with the next one. The second path is `store_and_write`, which also writes a message for a single session and the response of a request, so a failed write is handled the same way there: the stream is dropped and the caller is told that nothing was written. The other reports of the transport are unchanged. ## How Has This Been Tested? With two new tests in `streamable_http_transport_test.rb`, one per path: of two streams the first is broken, and the reporter raises. Both fail against the previous tree with the reporter's exception. ## Breaking Changes None.
This branch has not been deployed
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.
Motivation and Context
A notification is written to one stream after another, and a write that fails on a stream is reported through the exception reporter before that stream is removed. A reporter that raised there ended the whole delivery: the failed stream stayed registered, the streams the delivery had not reached yet never received the notification, and the exception went to the code that emitted the change.
The report of a failed stream write now ignores a reporter that raises, on both paths that write to several streams: the
subscriptions/listenstreams and the streams of the sessions. The failed stream is removed as before, and the delivery continues with the next one. The second path isstore_and_write, which also writes a message for a single session and the response of a request, so a failed write is handled the same way there: the stream is dropped and the caller is told that nothing was written. The other reports of the transport are unchanged.How Has This Been Tested?
With two new tests in
streamable_http_transport_test.rb, one per path: of two streams the first is broken, and the reporter raises. Both fail against the previous tree with the reporter's exception.Breaking Changes
None.
Types of changes
Checklist