When there is an update on a document, oplog entry is supposed to generate $set/$unset key and value.
But it seems I am getting another format in 5.0.x.
{
lsid: {
id: UUID("cb05cafc-c6e5-499a-904f-70e5f42506ed"),
uid: Binary(Buffer.from("d2ca1836aaed04eff4b456c51087fcebefbf828ce3769117ac24ba7e0aa04ba5", "hex"), 0)
},
txnNumber: Long("1"),
op: 'u',
ns: 'io_blitzz.usertable',
ui: UUID("5430849c-6922-4ecf-a535-cf1d5c804b2c"),
o: { '$v': 2, diff: { u: { a: 'simple bbb' } } },
o2: { _id: ObjectId("62a1d82c6ce0604e2a9e1636") },
ts: Timestamp({ t: 1656074879, i: 2 }),
t: Long("7"),
v: Long("2"),
wall: ISODate("2022-06-24T12:47:59.109Z"),
stmtId: 0,
prevOpTime: { ts: Timestamp({ t: 0, i: 0 }), t: Long("-1") },
postImageOpTime: { ts: Timestamp({ t: 1656074879, i: 1 }), t: Long("7") }
}
If I check on 4.0.x, it works as expected.
{ "lsid" : { "id" : UUID("439488ea-86e3-407e-bd85-97c84fcf380d"), "uid" : BinData(0,"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=") }, "txnNumber" : NumberLong(1), "op" : "u", "ns" : "io.usertable", "ui" : UUID("7f1d5ea3-6a83-4fb1-8baa-8e87baa3a8d7"), "o" : { "$v" : 1, "$set" : { "surname" : "a1 caprio" } }, "o2" : { "_id" : ObjectId("62b94beb1a070faf11a9eaf0") }, "ts" : Timestamp(1656312210, 4), "t" : NumberLong(1), "v" : NumberLong(2), "wall" : ISODate("2022-06-27T06:43:30.533Z"), "stmtId" : 0, "prevOpTime" : { "ts" : Timestamp(0, 0), "t" : NumberLong(-1) }, "postImageOpTime" : { "ts" : Timestamp(1656312210, 3), "t" : NumberLong(1) } }