Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-4770

"Shard results differ" warning when sharding is not used

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.29.4
    • Affects Version/s: None
    • Component/s: Explain
    • Labels:
      None
    • 3
    • Not Needed
    • Iteration Minsk

      for (let i = 0; i < 10000; i++) db.coll.insertOne({ a: ((Math.random() * 1000) | 0), b: ((Math.random() * 1000) | 0) });
      db.coll.createIndex({a:1})
      db.coll.createIndex({b:1})
      

      Then explain in Compass for a query like

      {$or:[{a:200},{b:300}]}
      

      will result in a “Shard results differ” warning message in the explain output because the server performs two index scans using different indexes, even though sharding is not involved.

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: