Replication fails to remove document if _id value is too long to index

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.4.8
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The following sequence of operations:

      db.coll.insert( { "_id":"keyvaluethat'slongerthan1024length", "a": 5 } );
      db.coll.remove( { "a" : 5 } );
      

      results in primary of a replica set having zero documents, but secondary having one document, since remove on the secondary attempts to remove by "_id".

      Now if there is a unique index on "a" and you insert a document on the primary with "a":5 the secondary will now crash with duplicate key error while the primary successfully has only a single value.

              Assignee:
              Unassigned
              Reporter:
              Asya Kamsky
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: