Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3138

Mongomirror output when source and destination collections are conflicting is misleading to the user

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical - P2
    • Resolution: Duplicate
    • None
    • No versions
    • None
    • None

    Description

      Problem Statement/Rationale

      The error message produced when running mongomirror with conflicting collections in the source and destination is highly misleading.

      Steps to Reproduce

      Create a source database with a single collection `foo`. Create a destination database `dev` with collections `foo` and `bar`. Setup mongomirror to mirror all collections from the source to the destination database. Results in:

      15:18:38.361 Failed: could not perform initial sync because the following collections exist on both the source and destination:
      15:18:38.361​ ​dev.foo 
      15:18:38.361​ Please remove these collections from the destination or run mongomirror with --drop. 

      Expected Results

      When running --drop based on the error message I would expect only the conflicting collections to be dropped (i.e. `foo`). A more expressive/clear error message such as 

      Please remove these collections from the destination or, to remove all collections from the destination, run mongomirror with --drop.

      is very much needed.
      h3. Actual Results

      When error message 

      Please remove these collections from the destination or run mongomirror with --drop.

      running `--drop` then removes both foo and bar.

      Attachments

        Activity

          People

            Unassigned Unassigned
            philip.leonard@teampicnic.com Philip Leonard
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: