Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1019

GridIn must use readPreference PRIMARY

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.1, 3.1.1
    • Fix Version/s: 3.2
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Python Sprint 28

      Description

      While investigating a spurious test failure in Jenkins I discovered that GridIn uses whatever read preference is set for the root collection. This isn't a problem, generally, when writing grid files. The driver always directs writes to the primary. But, following the GridFS spec, we attempt to create the required indexes for GridFS if they are needed. To determine if the indexes are needed we first do a find_one() on the root collection. If the read preference of the root collection is anything other than PRIMARY we direct that query to a secondary.

      GridIn should store an instance of root_collection with read preference set to PRIMARY.

        Attachments

          Activity

            People

            Assignee:
            behackett Bernie Hackett
            Reporter:
            behackett Bernie Hackett
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: