Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-329

Bulk insert with unique key constraint result in data loss

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 2.1.1
    • Component/s: None
    • Environment:
      Ubuntu 10.04 2.6.32-38-generic x86_64 - Mongodb 2.0.2 - Python 2.6

      Given a collection with a unique index; bulk inserts seem to silently drop documents; See the attached python script to reproduce the problem. It inserts documents with duplicate unique keys - inserts are performed using different bulk sizes (from bulk size 1 to one bulk for the whole test data). Among the 18 documents in the test data there are 10 unique keys, however, for none singleton inserts less than 10 items end up in the collection (the number of items in the collection is roughly number of bulks +/- 1).

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            pprett Peter Prettenhofer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: