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

Remove dependency of the write commands on `sharding_runtime_d`

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.2, 4.1.1
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change
    • Backport Requested:
      v4.0
    • Sprint:
      Sharding 2018-07-16, Sharding 2018-07-30

      Description

      The write commands execution logic handles StaleConfig exceptions differently from regular commands because of the need to contain the exception as part of the array of write results and not as part of the command result itself. Specifically, it does not let the exception bubble-up to the endpoint code and instead invokes onShardVersionMismatch or onCannotImplicitlyCreateCollection directly.

      This causes a linking dependency of the write commands library on sharding_runtime_d, but also introduces more places where onShardVersionMismatch could be called, which could be a source of bugs.

      This ticket is to figure out an implementation, which consolidates the onShardVersionMismatch actions in one place (preferably the entry point) and to remove the link dependency on sharding_runtime_d.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cheahuychou.mao Cheahuychou Mao
              Reporter:
              kaloian.manassiev Kaloian Manassiev
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: