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

Equality query on _id with a sort fails with an InternalError when routed through mongos

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.9
    • Component/s: Querying, Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      QuInt A (10/12/15)

      Description

      This is a bug in the new mongos read path, so it only affects the master branch. It does not affect any stable versions.

      The following script reproduces the problem:

      (function() {
          'use strict';
       
          var st = new ShardingTest({shards: 1});
       
          var sdb = st.s.getDB("test");
          var coll = sdb.sortkey_internal_error;
       
          coll.drop();
          assert.writeOK(coll.insert({_id: 1, a: 2}));
       
          assert.eq(1, coll.find({_id: 1}).sort({a: 1}).itcount());
       
          st.stop();
      })();
      

      Looks like a bad interaction between idhack and sortKey meta-projection.

        Attachments

          Activity

            People

            Assignee:
            yunhe.wang YunHe Wang
            Reporter:
            david.storch David Storch
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: