[SERVER-53000] Retry command on stale exception on shards only if the shard is stale Created: 20/Nov/20  Updated: 29/Oct/23  Resolved: 13/Aug/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.1.0-rc0

Type: Task Priority: Major - P3
Reporter: PM Bot Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: autogen-todo, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-52784 Retry command on stale exception on s... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2021-08-23
Participants:

 Description   

Thanks to  SERVER-28943 shards now retry non-write commands on stale exception.
This is done unconditionally even if the exception is indicating that the router was stale.

Once database and collection version will be truly comparable (SERVER-52587) we can conditionally refresh and retry the command only if "requiredVersion (Router) > wantedVersion (Shard)".

This new behavior should be either addressed once 5.0 becomes last-lts or should be guarded by an FCV flag in order to be sure that we are on a binary version that uses truly comparable database and collection versions.

------

There is a TODO in the codebase referencing a resolved ticket which is assigned to you.

Please follow this link to see the lines of code referencing this resolved ticket:
https://github.com/mongodb/mongo/search?q=SERVER-52784&type=Code

The next steps for this ticket are to either remove the outdated TODO or follow the steps in the TODO if it is correct. If the latter, please update the summary and description of this ticket to represent the work you're actually doing.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 11/Aug/21 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-53000 Retry command on stale exception on shards only if the shard is stale
Branch: master
https://github.com/mongodb/mongo/commit/079b4cb1f3b2b527a3294ba74c806e83310245dc

Generated at Thu Feb 08 05:29:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.