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

Insert from update replaces {_id:Timestamp()} with current date+inc

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.5
    • Component/s: Replication, Write Ops
    • Labels:
      None
    • Backwards Compatibility:
      Major Change
    • Operating System:
      ALL
    • Steps To Reproduce:
      1. Startup a replica set.
      2. launch shell to primary
      3. Executed db.foo.insert({_id:Timestamp()})
      4. Secondary dies.

      Description

      When inserting a document into a collection using a Timestamp as the identifier, if the time and ordinal are both 0, the secondary fails on replication and throws an fassert failure causing mongod to die. In addition, any attempt to restart the secondary will fail as that same op will attempt to replicate and cause the same exception again. This is a change in behavior from the previous 2.4 release line.

      I tried this with other combinations of timestamps, both in value and in location in the document and it's always when the timestamp is _id with 0's for both of its components.

      2014-01-13T14:03:24.987-0600 [repl writer worker 1] ERROR: writer worker caught
      exception:  :: caused by :: 16836 The _id field cannot be changed from {_id: Timestamp 0|0} to {_id: Timestamp 1389643404000|1}. on: { ts: Timestamp 1389643404000|1, h: -2969864546816060428, v: 2, op: "i", ns: "test.foo", o: { _id: Timestamp 0|0 } }
      2014-01-13T14:03:24.987-0600 [repl writer worker 1] Fatal Assertion 16360
      2014-01-13T14:03:24.987-0600 [repl writer worker 1]
       
      ***aborting after fassert() failure

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: