This appears to be the result of the changes from ab165e7 as part of SERVER-28762 and therefore doesn't affect any released version of MongoDB.
Additionally, I think it is worth mentioning that this issue was only detected because the update operation produced a different result (i.e. the correct one) when applied by the secondary despite having the same $set modifier.
{ "ts" : Timestamp(1498018241, 1), "t" : NumberLong(1), "h" : NumberLong("-5655460550431900619"), "v" : 2, "op" : "c", "ns" : "test.$cmd", "wt" : ISODate("2017-06-21T04:10:41.164Z"), "o" : { "create" : "mycoll", "idIndex" : { "v" : 2, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "test.mycoll" } } } { "ts" : Timestamp(1498018241, 2), "t" : NumberLong(1), "h" : NumberLong("8601612499795829594"), "v" : 2, "op" : "i", "ns" : "test.mycoll", "wt" : ISODate("2017-06-21T04:10:41.164Z"), "o" : { "_id" : 0, "a" : [ ] } } { "ts" : Timestamp(1498018241, 3), "t" : NumberLong(1), "h" : NumberLong("7416058103814577585"), "v" : 2, "op" : "u", "ns" : "test.mycoll", "o2" : { "_id" : 0 }, "wt" : ISODate("2017-06-21T04:10:41.166Z"), "o" : { "$set" : { "a.10" : 10, "a.2" : 2 } } }
- is related to
-
SERVER-28762 Conditionally parse an update expression as an UpdateNode tree
- Closed