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

copyDatabase() fails due to document validation

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.3.15
    • Component/s: Usability
    • Labels:
      None
    • ALL
    • Hide
      • Create a database
      • Create a collection with one structure
      • Define a validator on the collection that enforces a different structure, throwing an error if the structure is incorrect.
      • Add new documents that observe the new structure
      • Use the copyDatabase() to copy this database to a new location
      • This copy should fail due to validation
      Show
      Create a database Create a collection with one structure Define a validator on the collection that enforces a different structure, throwing an error if the structure is incorrect. Add new documents that observe the new structure Use the copyDatabase() to copy this database to a new location This copy should fail due to validation

      when calling the command db.copyDatabase() the command will fail if one of the documents in a collection fails document validation. This probably isn't a bug but it is undesirable behaviour. When requesting a copy of a database that is what I want, a copy, warts and all.

      In my case this problem comes about because in the early days of my database I didn't have document validation in place. Later on I put validation in place and enforced it strictly.

            Assignee:
            Unassigned Unassigned
            Reporter:
            richard.bibb@ashendencapital.com Richard Bibb
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: