A cursor created with the oplogReplay option does not perform any projection:
MongoDB shell version v3.6.3 connecting to: mongodb://127.0.0.1:27017 MongoDB server version: 3.6.3 PRIMARY> db.getSiblingDB("local").oplog.rs.find({ts: {$gte: Timestamp(0, 0)}}).sort({$natural:-1}).limit(1).oplogReplay().projection({"ts":1}) { "ts" : Timestamp(1521826871, 1), "h" : NumberLong("-7809205279583470656"), "v" : 2, "op" : "n", "ns" : "", "wall" : ISODate("2018-03-23T17:41:11.487Z"), "o" : { "msg" : "initiating set" } } PRIMARY> db.getSiblingDB("local").oplog.rs.find({ts: {$gte: Timestamp(0, 0)}}).sort({$natural:-1}).limit(1).projection({"ts":1}) { "ts" : Timestamp(1521826873, 5) }
- is depended on by
-
TOOLS-1984 Investigate what fields to drop from oplog entries
-
- Closed
-