- 
    Type:
Question
 - 
    Resolution: Duplicate
 - 
    Priority:
Major - P3
 - 
    None
 - 
    Affects Version/s: None
 - 
    Component/s: None
 - 
    None
 
- 
        None
 
- 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        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: 
,
  ns: 'spotmasterNotes.notes',
  o2: 
,
  op: 'u',
  h: 
,
  o: 
,
  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: 
,
  ns: 'spotmasterNotes.notes',
  o2: 
,
  op: 'u',
  h: 
,
  o: { '$set': 
 },
  v: 2 }
Any idea why this happens ?
- duplicates
 - 
                    
SERVER-1606 Oplog entries contain repeated fields ($set)
-         
 - Closed
 
 -