From b7440bfe4fa3c23877049655b1995ddf9c9c03fa Mon Sep 17 00:00:00 2001 From: norareidy Date: Wed, 23 Oct 2024 11:29:35 -0400 Subject: [PATCH 1/5] DOCSP-44627: Add retry information --- source/fundamentals/transactions.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/fundamentals/transactions.txt b/source/fundamentals/transactions.txt index 66c82a17..7d2a3539 100644 --- a/source/fundamentals/transactions.txt +++ b/source/fundamentals/transactions.txt @@ -94,8 +94,11 @@ describes these methods: transaction was committed or ended. * - ``and_run()`` - - | Runs the given callback, then commits or ends the transaction. When you - use this method to perform a transaction, the driver automatically + - | Runs the given callback, then commits or ends the transaction. If + the callback causes a transient transaction error, the server retries + the callback. If the callback causes any other error, the server + ends the transaction and returns the error to the caller. When + you use this method to perform a transaction, the driver automatically handles any errors, so you can choose to omit error handling code. | | Because the callback returns a future and can be run multiple From 7c8911e97e395649141be941578a60de2cd6f33a Mon Sep 17 00:00:00 2001 From: norareidy Date: Wed, 23 Oct 2024 11:36:22 -0400 Subject: [PATCH 2/5] wording --- source/fundamentals/transactions.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/fundamentals/transactions.txt b/source/fundamentals/transactions.txt index 7d2a3539..2f767cfa 100644 --- a/source/fundamentals/transactions.txt +++ b/source/fundamentals/transactions.txt @@ -95,8 +95,8 @@ describes these methods: * - ``and_run()`` - | Runs the given callback, then commits or ends the transaction. If - the callback causes a transient transaction error, the server retries - the callback. If the callback causes any other error, the server + the callback raises a transient transaction error, the server retries + the callback. If the callback raises any other error, the server ends the transaction and returns the error to the caller. When you use this method to perform a transaction, the driver automatically handles any errors, so you can choose to omit error handling code. From 754f39c55a86be8bb2098e6f1ff6a35590944de0 Mon Sep 17 00:00:00 2001 From: norareidy Date: Thu, 24 Oct 2024 11:23:18 -0400 Subject: [PATCH 3/5] driver fix --- source/fundamentals/transactions.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/fundamentals/transactions.txt b/source/fundamentals/transactions.txt index 2f767cfa..61de025f 100644 --- a/source/fundamentals/transactions.txt +++ b/source/fundamentals/transactions.txt @@ -95,8 +95,8 @@ describes these methods: * - ``and_run()`` - | Runs the given callback, then commits or ends the transaction. If - the callback raises a transient transaction error, the server retries - the callback. If the callback raises any other error, the server + the callback raises a transient transaction error, the driver retries + the callback. If the callback raises any other error, the driver ends the transaction and returns the error to the caller. When you use this method to perform a transaction, the driver automatically handles any errors, so you can choose to omit error handling code. From d38edf53d2e094bed5e8da2f54b69e7137d91cfe Mon Sep 17 00:00:00 2001 From: norareidy Date: Thu, 24 Oct 2024 17:00:54 -0400 Subject: [PATCH 4/5] MR feedback --- source/fundamentals/transactions.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/fundamentals/transactions.txt b/source/fundamentals/transactions.txt index 61de025f..4a3a2a1f 100644 --- a/source/fundamentals/transactions.txt +++ b/source/fundamentals/transactions.txt @@ -95,11 +95,12 @@ describes these methods: * - ``and_run()`` - | Runs the given callback, then commits or ends the transaction. If - the callback raises a transient transaction error, the driver retries - the callback. If the callback raises any other error, the driver - ends the transaction and returns the error to the caller. When - you use this method to perform a transaction, the driver automatically - handles any errors, so you can choose to omit error handling code. + the callback raises an error with a ``TRANSIENT_TRANSACTION_ERROR`` + label, the driver retries the callback. If the callback raises any + other error, the driver ends the transaction and returns the error + to the caller. When you use this method to perform a transaction, + the driver automatically handles any errors, so you can choose to omit + error handling code. | | Because the callback returns a future and can be run multiple times, the Rust language closure borrowing rules for captured From b10f8a5c0abc7819487b7e4478e8b0eeebb97f54 Mon Sep 17 00:00:00 2001 From: norareidy Date: Fri, 25 Oct 2024 15:40:11 -0400 Subject: [PATCH 5/5] tech feedback --- source/fundamentals/transactions.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/fundamentals/transactions.txt b/source/fundamentals/transactions.txt index 4a3a2a1f..bb3fe403 100644 --- a/source/fundamentals/transactions.txt +++ b/source/fundamentals/transactions.txt @@ -94,9 +94,9 @@ describes these methods: transaction was committed or ended. * - ``and_run()`` - - | Runs the given callback, then commits or ends the transaction. If - the callback raises an error with a ``TRANSIENT_TRANSACTION_ERROR`` - label, the driver retries the callback. If the callback raises any + - | Runs the given callback, then commits or ends the transaction. The + driver retries callbacks and commits that raise an error with a + ``TRANSIENT_TRANSACTION_ERROR`` label. If they raise any other error, the driver ends the transaction and returns the error to the caller. When you use this method to perform a transaction, the driver automatically handles any errors, so you can choose to omit