From c9c3c6f289749c2476564a4cfe7e8fe8e3c5207e Mon Sep 17 00:00:00 2001 From: Kyle Kloberdanz Date: Thu, 17 Aug 2023 08:30:13 -0500 Subject: [PATCH] Add missing retryable write case to pseudo code The pseudo code example for executing retryable write commands was missing the case below: - CSOT is not enabled and one retry was attempted. This corrects the pseudo code to unify it with the prose description. Related to: DRIVERS-1807 --- source/retryable-writes/retryable-writes.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/retryable-writes/retryable-writes.rst b/source/retryable-writes/retryable-writes.rst index bd6aafdbfa..f22b39618d 100644 --- a/source/retryable-writes/retryable-writes.rst +++ b/source/retryable-writes/retryable-writes.rst @@ -513,6 +513,11 @@ The above rules are implemented in the following pseudo-code: if (timeoutMS != null && isExpired(timeoutMS) { throw previousError; } + + /* If CSOT is not enabled attempt one retry before giving up. */ + if (timeoutMS == null) { + return executeCommand(server, retryableCommand); + } } }