Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-30650

mongo shell adds readPreference to findAndModify explain

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Fully Compatible
    • ALL
    • Query 2017-09-11, Query 2017-10-02

      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.

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: