Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-995

CollectionView.parallel_scan doesn't apply proper filter

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.1.0
    • Component/s: Public API
    • Labels:
      None
    • Environment:
      ruby-2.2.2

      Description

      I've noted the issue on the original PR which integrated the code here: https://github.com/mongodb/mongo-ruby-driver/pull/619

      Issue seems that I can provide a filter for a .find() method but the parallel_scan returns cursors that do not apply the given filter.

      An example, reproduced for you here:

      mongo[:users].find(firstName: 'Jerry').parallel_scan(8).each do |cursor|
      cursor.each do |u|
      u[:firstName] # This shows firstName of ALL users (i.e. no filter applied)
      end
      end

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              emily.stolfo Emily Stolfo
              Reporter:
              linjer Jerry Lin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: