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

$maxScan only works for initial query

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.8.3, 2.0.0, 2.4.7
    • Component/s: Querying
    • Labels:
      None
    • ALL

      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

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

              Created:
              Updated:
              Resolved: