Closed prishedko closed 2 years ago
.flatMap(v -> query(c))
.flatMap(v -> query(c))
introduces concurrency to a single connection. Please ensure to not run queries concurrently and please avoid nested queries on the same connection since response processing is a stream and your application wanting to consume the next result while the previous result is not fully consumed can lock up the process entirely.
Looks like it's the case. Thank you for the fast reply!
Bug Report
Versions
Current Behavior
I've modified test example from ticket 216 to build a bit more complex reactive flow like:
Execution of such flow hangs up with pretty high probability in most cases. In the attached tests (see below) it looks like:
And sometime (though pretty rare) it fails with:
There is the full log for IllegalReferenceCountException case.
I tested it with r2dbc-postgresql and also with using r2dbc-pool - there is no such bug with PostgreSQL and using of the pool only decreases probability of the bug.
Steps to reproduce
To reproduce the issue, please run mssql_tests.sh or mssql_snapshot_isolation_tests.sh from the attached maven project.