-
Notifications
You must be signed in to change notification settings - Fork 188
Closed
Labels
type: bugA general bugA general bug
Milestone
Description
Bug Report
commitTransaction()
emits an error signal upon processing ErrorResponse
. A subsequent call to rollbackTransaction
fails with "no transaction in progress" because the driver hasn't processed the final ReadyForQuery
frame.
The driver should await the entire completion before throwing the error signal.
Reproducer
Input Code
CREATE TABLE tst(x int CONSTRAINT test_me UNIQUE DEFERRABLE INITIALLY DEFERRED);
Steps to reproduce
Input Code
ConnectionFactory connectionFactory = ConnectionFactories.get("r2dbc:postgresql://postgres:postgres@localhost/postgres");
Connection block = Mono.from(connectionFactory.create()).block();
Mono.from(block.beginTransaction()).block();
Flux.from(block.createStatement("insert into tst values(1)").execute())
.flatMap(it -> it.getRowsUpdated()).blockLast();
Flux.from(block.createStatement("insert into tst values(1)").execute())
.flatMap(it -> it.getRowsUpdated()).blockLast();
Mono.from(block.commitTransaction()).block();
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug