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

ensuring unique index on collection with duplicate breaks cursor

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.8.1, 2.0.1
    • Component/s: Index Maintenance
    • Environment:
      Ubuntu 11.10 64bit
    • Query
    • Linux

      Given a collection A with 10000 documents, each containing one property `name`, in which 2 documents have the same name, if we execute ensureIndex with option unique on name and immediately follow with a find() for all documents, the index fails (as expected) but the find() only returns with 101 documents.

      Here is an example using Mongoose on Nodejs:
      https://gist.github.com/1449032

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            aheckmann Aaron Heckmann
            Votes:
            9 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: