This fixes the Subscription publisher so that it does not drop values…#1801
Merged
Conversation
… that have been received but not yet mapped by the graphql layer
bbakerman
commented
Feb 28, 2020
| } | ||
|
|
||
|
|
||
| def "asynchronous mapping works with completion"() { |
Member
Author
There was a problem hiding this comment.
I did real TDD on this test. I write it first with async delay and saw the problem consistently happen.
I then fixed the code! :)
bbakerman
added a commit
that referenced
this pull request
May 20, 2020
… that have been received but not yet mapped by the graphql layer (#1801)
dugenkui03
pushed a commit
to dugenkui03/graphql-java
that referenced
this pull request
May 21, 2020
… that have been received but not yet mapped by the graphql layer (graphql-java#1801)
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.
This fixes the Subscription publisher so that it does not drop values that have been received but not yet mapped by the graphql layer
Its related to #1781 in that it addresses the same issue. I created a specific issue at #1799
The challenge he is that we take a
Publisher<T>and turn it into aPublish<CompleteableFuture<T>>With the values being async we can call
onCompletebefore the values themselves have been received and processed.This queues outstanding CFs so that when they complete they will call a runnable to complete / onerror IF they are yet to complete.
The size of the queue is the rate at which they arrive and don't get completed by the graphql layer call and also a function of the "subscribe" number that the person provides