Right now whenever the shard detects a failure for a StaleShardVersionError or a ShardCannotRefreshDueToLocksHeld error it checks to see if it's for a getMore cursor (respecively here, and here). This is because the cursor may have been consumed by getMore and closed it as a result which makes the error non-retryable.
However, aggregations may do the same with a $mergeCursors stage since it may have done getMores on them and subsequently fail the operation due to the same errors. This is especially true of aggregations that use $lookup and $graphLookup.
As a result, the operation is retried and terminally failed due to a CursorNotFound error, which is non-retryable due to not having the TransientTransactionError label.
- is depended on by
-
SERVER-88099 Add FSM test for $lookup against foreign sharded collections within transactions
- Closed