diff options
| author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-14 14:26:38 -0300 |
|---|---|---|
| committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-14 14:26:38 -0300 |
| commit | 294bc6ecabf14c09c9bc8644704921dcf97cb44e (patch) | |
| tree | 279b1e0bab53901a1647ac63c1c724f0f789a663 /src/mongo/db/catalog/README.md | |
| parent | 70be7c27a251621187a1de533462ae2bb1e3bd39 (diff) | |
| parent | 1e917fd798aa25b7066d4b414b51184f13d5a092 (diff) | |
Update upstream source from tag 'upstream/6.0.10'debian/6.0.10-1
Update to upstream version '6.0.10'
with Debian dir 2d176fa254eee97b139f712fec5709641335a8c3
Diffstat (limited to 'src/mongo/db/catalog/README.md')
| -rw-r--r-- | src/mongo/db/catalog/README.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mongo/db/catalog/README.md b/src/mongo/db/catalog/README.md index ddb5d479da2..5fe1a00de68 100644 --- a/src/mongo/db/catalog/README.md +++ b/src/mongo/db/catalog/README.md @@ -432,6 +432,30 @@ See [wtRcToStatus](https://github.com/mongodb/mongo/blob/c799851554dc01493d35b43701416e9c78b3665c/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp#L178-L183) where we throw the exception in WiredTiger. See [TemporarilyUnavailableException](https://github.com/mongodb/mongo/blob/c799851554dc01493d35b43701416e9c78b3665c/src/mongo/db/concurrency/temporarily_unavailable_exception.h#L39-L45). + +## TransactionTooLargeForCacheException + +A TransactionTooLargeForCacheException may be thrown inside the server to indicate that an operation +was rolled-back and is unlikely to ever complete because the storage engine cache is insufficient, +even in the absence of concurrent operations. This is determined by a simple heuristic wherein, +after a rollback, a threshold on the proportion of total dirty cache bytes the running transaction +can represent and still be considered fullfillable is checked. The threshold can be tuned with the +`transactionTooLargeForCacheThreshold` parameter. Setting this threshold to its maximum value (1.0) +causes the check to be skipped and TransactionTooLargeForCacheException to be disabled. + +On replica sets, if an operation succeeds on a primary, it should also succeed on a secondary. It +would be possible to convert to both TemporarilyUnavailableException and WriteConflictException, +as if TransactionTooLargeForCacheException was disabled. But on secondaries the only +difference between the two is the rate at which the operation is retried. Hence, +TransactionTooLargeForCacheException is always converted to a WriteConflictException, which retries +faster, to avoid stalling replication longer than necessary. + +Prior to 6.3, or when TransactionTooLargeForCacheException is disabled, multi-document +transactions always return a WriteConflictException, which may result in drivers retrying an +operation indefinitely. For non-multi-document operations, there is a limited number of retries on +TemporarilyUnavailableException, but it might still be beneficial to not retry operations which are +unlikely to complete and are disruptive for concurrent operations. + ## Collection and Index Writes Collection write operations (inserts, updates, and deletes) perform storage engine writes to both |
