Uploaded image for project: 'PHP Legacy Driver'
  1. PHP Legacy Driver
  2. PHP-1507

Aggregate with $out random fails with "not master" error code

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: 1.6.11, 1.6.12
    • Fix Version/s: None
    • Component/s: pecl-mongo
    • Labels:
      None
    • Environment:
      Apache/2.4.7 (Ubuntu)
    • # Replies:
      2
    • Last comment by Customer:
      true

      Description

      As you can see in the attached log it looks like the aggregate is not forced to run against primary.
      There is a (WARN): Forcing aggregate with $out to run on primary
      triggered but its not working. As you can see its actually doing a random selection
      2016-03-04 14:28:57 - REPLSET (INFO): pick server: random element 1

      If by chance it picks 0 then its ok otherwise it fails

      I have tried setting read preferences all over the place to no avail, it appears that something is broken when setting "primary" only preference.

      e.g

      If I remove the $out stage, then it works (always picks up primary), However if I manually set the readPreference to "primary" it gets this random behaviour.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vlopez Victor Lopez
              Participants:
              Last commenter:
              Rathi Gnanasekaran (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                3 years, 34 weeks, 1 day ago
                Date of 1st Reply: