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

Write FSM concurrency workload for removeShard and movePrimary

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Sharding
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Sharding 2017-08-21

      Description

      Consider the case where we have two nodes, A and B, where A is the primary. If we call movePrimary to move A to B and at the same time call removeShard on B, then the following might happen.

      1. movePrimary copies unsharded collections from A to B.
      2. removeShard checks if B is the primary, which it is not.
      3. movePrimary updates the config server, which now thinks B is the primary.
      4. removeShard removes B.
      5. movePrimary deletes original unsharded collections from A.
        If the above were to happen, then all unsharded collections are deleted, and there would exist no primary, which is very bad.

      An FSM concurrency workload should be written to test this type of behavior, and what would happen.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: