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

Oplog contains missing information ?

    • Type: Icon: Question Question
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Question about the opLog for mongodb.

      I am using oplog to trigger events based on the database updates.
      note: I am reading opLog from node.js, so i'm not sure if this is a node driver issue or just a standard opLog issue.

      If you try:

      db.notes.insert(

      {status:'new',subject:'subject 1'}

      )

      db.notes.update({_id: ObjectId("512231109946135b79af6bec")},

      {status:'pending',subject:'subject 2'}

      );

      //We expect that both fields are shown in oplog (CORRECT)
      oplog ..
      { ts:

      { _bsontype: 'Timestamp', low_: 1, high_: 1361195351 }

      ,
      ns: 'spotmasterNotes.notes',
      o2:

      { _id: 512231109946135b79af6bec }

      ,
      op: 'u',
      h:

      { _bsontype: 'Long', low_: 1743521552, high_: 1346864790 }

      ,
      o:

      { status: 'pending', subject: 'subject 2' }

      ,
      v: 2 }

      db.notes.update({_id: ObjectId("512231109946135b79af6bec")},{$set:{status:'close',subject:'subject 3'}});

      //We expect that both fields are shown in oplog (WRONG only one shown)
      oplog ..
      { ts:

      { _bsontype: 'Timestamp', low_: 1, high_: 1361195394 }

      ,
      ns: 'spotmasterNotes.notes',
      o2:

      { _id: 512231109946135b79af6bec }

      ,
      op: 'u',
      h:

      { _bsontype: 'Long', low_: 172060737, high_: -1048766452 }

      ,
      o: { '$set':

      { subject: 'subject 3' }

      },
      v: 2 }

      Any idea why this happens ?

            Assignee:
            Unassigned Unassigned
            Reporter:
            kurteknikk Kurt Agius
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: