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

CollectionView.parallel_scan doesn't apply proper filter

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.1.0
    • Affects Version/s: 2.1.0
    • Component/s: Public API
    • None
    • Environment:
      ruby-2.2.2

      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

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

              Created:
              Updated:
              Resolved: