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
    • Labels:
    • 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.

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