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

'movePrimary' should issue a warning if data exists in the database being moved

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Operating System:
      ALL

      Description

      This is an extension to SERVER-3562. That fix caused the 'movePrimary' command to not move any collection data for sharded collections. Because 'movePrimary' (or 'clone') does not take out a write lock, it is possible for users to try to write to that collection while the clone is in-flight. If they do so before the metadata is updated, the writes can be lost.

      The long-term fix would be to lock all of the collections being moved by 'clone'. As a short-term fix, I'd suggest having 'movePrimary' return a warning if it detects any unsharded collections in the database being moved.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              william.zola@10gen.com William Zola
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: