Compact claims not to enforce unique indexes but actually does

XMLWordPrintableJSON

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

      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 Stearn
            Reporter:
            Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: