[SERVER-54702] Support DDL commands retry from the router Created: 22/Feb/21  Updated: 27/Oct/23  Resolved: 19/Mar/21

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

Type: Task Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: [DO NOT USE] Backlog - Sharding EMEA
Resolution: Works as Designed Votes: 0
Labels: PM-1965-Milestone-1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Sharding EMEA
Participants:

 Description   

If a DDL operation is sent by the router to a databases's non-primary shard, the error is currently not retryable.

There should be a new kind of "retryable" exception in order to implement something similar to the following logic:

retries = 0;
do{
 try{
    // best effor get db primary
    // call DDL on db primary
 }catch(/* not primary node for db */){
     retries++;
 }
}while(retries < 3);



 Comments   
Comment by Pierlauro Sciarelli [ 19/Mar/21 ]

Closing because the resilient coordinator is returning StaleDb exception in case the request arrives on a non-primary node.

Comment by Kaloian Manassiev [ 22/Feb/21 ]

Isn't the retryable exception in question just StaleDbVersion? This is what will come back from the shard.

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