Operational Defect Database

BugZero found this defect 27 days ago.

MongoDB | 2649123

Aggregations can retry non-idempotent operations that use cursors on certain failures

Last update date:

4/22/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

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.

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

In Code Review

Learn More

Search:

...