[SERVER-34096] A cursor with oplogReplay does not perform any field projection Created: 23/Mar/18  Updated: 05/Jul/18  Resolved: 08/Jun/18

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 3.2.19, 3.4.14, 3.6.3, 3.7.3
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Shane Harvey Assignee: Asya Kamsky
Resolution: Won't Fix Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by TOOLS-1984 Investigate what fields to drop from ... Closed
Related
Operating System: ALL
Steps To Reproduce:

Attempt to use the oplogReplay and projection options in the same query.

Participants:

 Description   

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) }



 Comments   
Comment by Asya Kamsky [ 08/Jun/18 ]

The query team would prefer not to work on this due to the number of changes planned in the near future to this part of the codebase.

Please re-open if this is causing significant amount of pain right now.

Comment by David Golden [ 21/May/18 ]

The oplog includes fields that are ignored when applied via applyOps, so the thought was to omit those from oplog documents to cut down on the amount of data in flight.

Comment by Asya Kamsky [ 21/May/18 ]

david.golden can you explain - I thought mongomirror literally would mirror the full data and oplog application - are there actual cases where it does not want full documents from the oplog?

 

Comment by Ian Whalen (Inactive) [ 27/Apr/18 ]

david.golden seth.payne - asya will discuss with you about priority.

Comment by David Golden [ 13/Apr/18 ]

mongomirror (and tools) would like to project out fields that aren't needed in order to increase throughput.

Comment by Ian Whalen (Inactive) [ 13/Apr/18 ]

shane.harvey can you give more info on what kind of impact this is having on mongomirror? we're inclined to put this on the backlog because there's no impact on the server's internal use here.

Generated at Thu Feb 08 04:35:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.