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

Clarify why we use AlternativeClientRegion under coordinator participant commands

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • CAR Team 2025-04-14, CAR Team 2025-04-28, CAR Team 2025-05-12
    • 164
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      We use an `AlternativeClientRegion` on most of the coordinator participant commands before releasing the critical section because multi-writes can't be performed using retryable writes.

      All the coordinator command participants are called with a sessionId and a txnNumber to enable replay protection (you can find more info about replay protection on the link attached to this ticket). This means that any operation done under its opCtx will be executed using retryable writes.

      However, this is not explained in any place where an `AlternativeClientRegion` is used to be able to release the critical section using multi-writes: here and here.

      I think clarifying this point in the code in a comment can help ShardingDDL developers understand quicker why we need an `AlternativeClientRegion`.

            Assignee:
            silvia.surroca@mongodb.com Silvia Surroca
            Reporter:
            silvia.surroca@mongodb.com Silvia Surroca
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: