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

Compact claims not to enforce unique indexes but actually does

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.7.5
    • Affects Version/s: 2.6.0
    • Component/s: Index Maintenance
    • None
    • Fully Compatible
    • ALL

      The claim that we don't want to enforce uniqueness in compact is made here:
      https://github.com/mongodb/mongo/blob/v2.6/src/mongo/db/structure/collection_compact.cpp#L157

      It doesn't actually work because we go directly to the index descriptor to check if dups are allowed here:
      https://github.com/mongodb/mongo/blob/v2.6/src/mongo/db/index/btree_based_access_method.cpp#L413

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: