Closed
Description
Bug Report
Versions
- Driver: 0.8.4.BUILD-SNAPSHOT
- Database: PostgreSQL 12
- Java: 1.8.0_202
- OS: macOS Catalina 10.15.5
Current Behavior
query doesn't complete and doesn't emit all of the rows.
Steps to reproduce
i forked r2dbc-postgresql
and added a new test that reproduce this issue.
take a look at this commit: mosherobinov@a679e8e
seems to be some kind of a race between the onNext()
and request()
when they are happening on different threads,
therefore i had to publish
on a different scheduler and limitRate
to 1 so the onNext()
and request()
will interleave.
the test times out after the query doesn't complete.
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
x0a1b commentedon Jun 25, 2020
I can confirm this happening; this fix should be part of
0.8.4.RELEASE
build.mp911de commentedon Jun 26, 2020
Thanks a lot for the reproducer. I'm going to investigate what's going on.
mp911de commentedon Jun 26, 2020
As it looks now, the emission gets stuck after
request(1)
. This is, because of missing upstream demand propagation (hasBufferedItems() && hasDownstreamDemand()
doesn't allow enteringdrainLoop
). CallingdemandMore()
helps to address the issue. Need to check whether that's the fix or whether we might miss something.Polishing
Ensure demand propagation from onRequest(…)
Polishing
12 remaining items