@@ -46,7 +46,10 @@ The callback API incorporates logic:
4646 :ref:`transient-transaction-error`.
4747
4848- To retry the commit operation if the commit encounters an
49- :ref:`unknown-transaction-commit-result`.
49+ :ref:`unknown-transaction-commit-result` error.
50+
51+ Starting in MongoDB 5.0.16, the server does not retry the transaction if
52+ it receives a :ref:`transactionTooLargeForCache-error` error.
5053
5154Example
5255~~~~~~~
@@ -412,6 +415,27 @@ If the commit operation encounters an error labeled
412415 ``"UnknownTransactionCommitResult"``, applications should explicitly
413416 incorporate retry logic for the error.
414417
418+ .. _transactionTooLargeForCache-error:
419+
420+ ``TransactionTooLargeForCache``
421+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
422+
423+ .. versionadded:: 5.0.16
424+
425+ Starting in MongoDB 5.0.16, the server does not retry the transaction if
426+ it receives a ``TransactionTooLargeForCache`` error. This error means
427+ the cache is too small and a retry is likely to fail.
428+
429+ The default value for the
430+ :parameter:`transactionTooLargeForCacheThreshold` threshold is ``0.75``.
431+ The server returns ``TransactionTooLargeForCache`` instead of retrying
432+ the transaction when the transaction uses more than 75% of the cache.
433+
434+ In earlier versions of MongoDB, the server returns
435+ ``TemporarilyUnavailable`` or ``WriteConflict`` instead of
436+ ``TransactionTooLargeForCache``.
437+
438+ Use the :dbcommand:`setParameter` command to modify the error threshold.
415439
416440Driver Version Errors
417441~~~~~~~~~~~~~~~~~~~~~
0 commit comments