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

Write FSM concurrency workload for removeShard and movePrimary

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
    • Sharding
    • Sharding 2017-08-21

      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.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            hugh.han Hugh Han
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: