[SERVER-84623] Shard-local re-execution of a command might bubble up a misleading StaleConfig exception to the router Created: 08/Jan/24  Updated: 06/Feb/24

Status: In Code Review
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Sergi Mateo Bellido Assignee: Jordi Olivares Provencio
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
is caused by SERVER-78115 Shard primaries must commit a majorit... Closed
Assigned Teams:
Catalog and Routing
Operating System: ALL
Sprint: CAR Team 2024-02-05, CAR Team 2024-02-19
Participants:
Linked BF Score: 0
Story Points: 2

 Description   

In some cases, when a shard realizes that the filtering metadata is not properly installed, it fails the current execution of the command, forces a refresh and then it re-executes the original command. If that refresh ends up failing, the error that is bubbled up to the router is the StaleConfig one and not the new one we got from the refresh. This behavior for in general makes a lot of sense: the router will retry the whole command and then the shard will execute the same steps as before, hoping that the refresh won't fail.

Bubbling up the StaleConfig instead of the proper error might be problematic in some cases, though: imagine that we get a NotPrimary exception. If we bubble up a StaleConfig exception the router won't realize that the primary has changed, potentially leading to a re-execution of the command with exactly the same consequences until we  exhaust the retries.


Generated at Thu Feb 08 06:55:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.