Skip to content

This fixes the Subscription publisher so that it does not drop values…#1801

Merged
bbakerman merged 1 commit into
masterfrom
subscription-drops-messages-on-complete
May 20, 2020
Merged

This fixes the Subscription publisher so that it does not drop values…#1801
bbakerman merged 1 commit into
masterfrom
subscription-drops-messages-on-complete

Conversation

@bbakerman
Copy link
Copy Markdown
Member

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 a Publish<CompleteableFuture<T>>

With the values being async we can call onComplete before 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

… that have been received but not yet mapped by the graphql layer
@bbakerman bbakerman added this to the 14.1 milestone Feb 28, 2020
@bbakerman bbakerman added the needs to be backported a bugfix that still needs to be backported label Feb 28, 2020
}


def "asynchronous mapping works with completion"() {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 bbakerman modified the milestones: 14.1, 15.0 Mar 2, 2020
@bbakerman bbakerman merged commit 15fb701 into master May 20, 2020
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)
bbakerman added a commit that referenced this pull request May 22, 2020
… that have been received but not yet mapped by the graphql layer (#1801) (#1909)
@andimarek andimarek deleted the subscription-drops-messages-on-complete branch June 5, 2020 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs to be backported a bugfix that still needs to be backported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant