[Tarantool-patches] [PATCH 2/4] txn_limbo: add diag_set in txn_limbo_wait_confirm

Serge Petrenko sergepetrenko at tarantool.org
Mon Jun 29 18:32:26 MSK 2020


Add failure reason to txn_limbo_wait_confirm

Prerequisite #5097
---
 src/box/txn_limbo.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c
index d3751a28b..abea26731 100644
--- a/src/box/txn_limbo.c
+++ b/src/box/txn_limbo.c
@@ -404,10 +404,12 @@ txn_limbo_wait_confirm(struct txn_limbo *limbo)
 		/* Clear the triggers if the timeout has been reached. */
 		trigger_clear(&on_complete);
 		trigger_clear(&on_rollback);
+		diag_set(ClientError, ER_SYNC_QUORUM_TIMEOUT);
 		return -1;
 	}
 	if (!cwp.is_confirm) {
 		/* The transaction has been rolled back. */
+		diag_set(ClientError, ER_SYNC_ROLLBACK);
 		return -1;
 	}
 	return 0;
-- 
2.24.3 (Apple Git-128)



More information about the Tarantool-patches mailing list