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

$maxScan only works for initial query

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: 1.8.3, 2.0.0, 2.4.7
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Operating System:
      ALL

      Description

      This came from http://groups.google.com/group/mongodb-user/browse_thread/thread/d8940067b89cb839

      $maxScan does not return expected results when it is >100

      To reproduce:
      > for(i=0; i<50000; i++){db.mxscan.save(

      {'ts':i, 'nr':i%47}

      );}
      > count = 0; db.mxscan.find()._addSpecial( "$maxScan" , 101 ).forEach( function

      { count += 1; } ); print(count);
      50000
      > count = 0; db.mxscan.find()._addSpecial( "$maxScan" , 100 ).forEach( function { count += 1; }

      ); print(count);
      100

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            barrie Barrie Segal
            Participants:
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: