[SERVER-30650] mongo shell adds readPreference to findAndModify explain Created: 14/Aug/17  Updated: 29/Jan/18  Resolved: 12/Sep/17

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Misha Tyulenev Assignee: David Storch
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-30466 shell should not inject $readPreferen... Backlog
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2017-09-11, Query 2017-10-02
Participants:

 Description   

As it appears from this local log
https://logkeeper.mongodb.org/build/d2202d47dbba7bf20ff65c834f624ce6/test/5991f5df90413033c907c9a7

assert.doesNotThrow(function() {
        coll.explain("allPlansExecution").findAndModify({query: {a: {$gte: 1}}, remove: true});
    });

this line throws if run under causally_consistent_jscore_passthrough and it means that the
$readPreference is added to the plan by shell code.

I verified that that Mongo.prototype._injectAfterClusterTime does not inject $readPreference it happens eariler, so the explain_multi_plan.js is blacklisted from the causally_consistent_jscore_passthrough.



 Comments   
Comment by Ian Whalen (Inactive) [ 05/Sep/17 ]

Currently assigned to Dave to figure out what's going on.

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