Re: Repeated $set's in oplog - bug?

35 views
Skip to first unread message

William Zola

unread,
Oct 28, 2012, 11:51:23 AM10/28/12
to mongod...@googlegroups.com
Marc -- when you look at these, are the values in the '$push' field the same, or different?

If they're different, then they are actually separate operations.  The repeated $sets are probably an artifact of how MongoDB tries to make the operations in the oplog idempotent.

 -William 

On Friday, October 26, 2012 2:16:11 PM UTC-7, Marc Tinkler wrote:
Hello, 

While looking at our oplog today, I noticed that many operations contain many (sometimes 15 in a row) duplicated $set objects. 

Does anyone know the reason for all the duplicated "$set"s? Is there something we are doing that can cause this, or is this just mongo weirdness?

Here's an example:

{
        "ts" : Timestamp(1351284504000, 1),
        "h" : NumberLong("4032111326304880614"),
        "op" : "u",
        "ns" : "thinkmap.gamesession",
        "o2" : {
                "_id" : "7BC81796-E180-46D4-9358-C8117251FE11",
                "ans" : {
                        "$size" : 12
                }
        },
        "o" : {
                "$set" : {
                        "ab" : 7.939708709716797
                },
                "$push" : {
                        "ans" : {
                                "qid" : 176635,
                                "ab" : 7.939708709716797,
                                "a" : 3,
                                "ts" : ISODate("2012-10-26T20:48:24.768Z"),
                                "pts" : 0,
                                "t" : "L",
                                "syn" : 110083,
                                "wrd" : "morbid",
                                "m" : "a",
                                "hnt" : false,
                                "c" : false
                        }
                },
                "$set" : {
                        "ab" : 7.939708709716797
                },
                "$set" : {
                        "ab" : 7.939708709716797
                },
                "$set" : {
                        "ab" : 7.939708709716797
                }
        }
}


Thanks,
Marc

Reply all
Reply to author
Forward
0 new messages