You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Await ReadyForQuery before emitting errors from transactional control methods.
commitTransaction, rollbackTransaction and other methods now await completion of the exchange before emitting error signals to properly synchronize completion.
Previously, error signals were emitted before updating the transaction state which could lead to invalid cleanup states if e.g. the commit failed.
[resolves#541]
Signed-off-by: Mark Paluch <[email protected]>
@@ -198,13 +202,17 @@ public Mono<Void> commitTransaction() {
198
202
// See discussion in pgsql-hackers: https://www.postgresql.org/message-id/b9fb50dc-0f6e-15fb-6555-8ddb86f4aa71%40postgresfriends.org
199
203
200
204
if ("ROLLBACK".equalsIgnoreCase(message.getCommand())) {
201
-
sink.error(newExceptionFactory.PostgresqlRollbackException(ErrorDetails.fromMessage("The database returned ROLLBACK, so the transaction cannot be committed. Transaction" +
202
-
" " +
203
-
"failure is not known (check server logs?)"), "COMMIT"));
205
+
ErrorDetailsdetails = ErrorDetails.fromMessage("The database returned ROLLBACK, so the transaction cannot be committed. Transaction" +
0 commit comments