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

Implement and document read preference passing in GridFS

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None

      Current read preference API in GridFS has the following issues:

      • Not all of the read methods pass the read preference to the underlying read stream. The best solution here is probably to support read preference in all GridFS read methods, since this appears to be technically feasible.
      • The docstrings do not accurately reflect which options can be passed to (and will be forwarded by) a particular method, especially on the reading side. Assuming all of the reading methods are changed to forward read preferences, most docstrings would need to be updated accordingly.
      • Some docstrings document that read preference is accepted as a string, and it is my impression that read preferences should always be passed as hashes.

      The tutorial also needs to be updated to match the new behavior when this ticket is implemented.

      Driver 2.10 adds read preference forwarding to some methods in order to implement spec tests added for 4.2, getting ahead of the curve with read preference implementation is likely to assist with future spec compliance efforts.

            Assignee:
            Unassigned Unassigned
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: