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

sort with index hint throws error unless limit applied

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.0.1
    • None
    • Environment:
      RHEL 5.7 x86_64
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      db.subscriber.ensureIndex({
      mnoId : 1,
      status: 1,
      suspended : 1,
      crmEvents : 1
      },
      { name : "ix_cvr_invite_1"
      })

      WORKS:

      db.subscriber.find({
      "mnoId" : "4ee0c5e898452dd133f84e9d",
      "status" : "TO_INVITE" ,
      "suspended" : false ,
      "$and" : [ { "profiles" : { "$elemMatch" :

      { "name" : "Language" , "values" : "English"}

      }}],
      }).sort({
      "crmEvents.0.timestamp" : 1
      }).hint("ix_cvr_invite_1").limit(30000);

      BROKEN:

      db.subscriber.find({
      "mnoId" : "4ee0c5e898452dd133f84e9d",
      "status" : "TO_INVITE" ,
      "suspended" : false ,
      "$and" : [ { "profiles" : { "$elemMatch" :

      { "name" : "Language" , "values" : "English"}

      }}],
      }).sort({
      "crmEvents.0.timestamp" : 1
      }).hint("ix_cvr_invite_1");

            Assignee:
            aaron Aaron Staple (Inactive)
            Reporter:
            rgibbon Robert Gibbon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: