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

Unify stale exception retry handlers in TransactionRouter

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Replication

      Inside the TransactionRouter, there are two different behaviors for retrying stale exceptions: canContinueOnStaleShardOrDbError and isSafeToRetryStaleErrors.

      Both methods have subtle differences:

      • canContinueOnStaleShardOrDbError → Returns true if there is at least one participant and the stale exception occurred in the first statement of the transaction. This is only used for routers (both standard and embedded routers).
      • isSafeToRetryStaleErrors → Returns true if the transaction router has not acted as a sub-router. This is only used for shards (either running with an embedded router or acting in the router role). This was recently introduced by SERVER-93430.

      The purpose of this ticket is to investigate the reasoning behind these differences and determine whether it is possible to unify both methods into one.

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

              Created:
              Updated: