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

Remove dependency of the write commands on `sharding_runtime_d`

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.2, 4.1.1
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Minor Change
    • v4.0
    • Sharding 2018-07-16, Sharding 2018-07-30

      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.

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

              Created:
              Updated:
              Resolved: