Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-90504

Investigate if we can retry the command after getting a stale exception because the shard is in the critical section

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • 2

      Currently, when the service entry point's retry logic attempts to execute the command and encounters the critical section, the policy makes the shard refresh, implicitly waiting for the critical section, and then not retry the command (code). This results in a stale exception without the expected version being returned to the router.

      If we modify the policy to retry the command, we can at least return the correct expected version to the router.

      The new flow would be as follows:

      1. The command is initially executed and encounters the critical section. 
      2. The shard refreshes in the service entry point, implicitly waiting for the critical section to be released. 
      3. The command is re-executed and encounters the stale exception again, but this time the exception contains the correct expected version (the one set during the critical section).

      The goal of this ticket is to investigate and implement it for all three stale config exceptions, if applies.

            Assignee:
            Unassigned Unassigned
            Reporter:
            pol.pinol@mongodb.com Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: