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

Pass read concern options through normal driver mechanisms

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.10.0.rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible

      Currently driver documentation specifies that read concern level can be a symbol only, but the URI options parsing code maps it to strings. Subsequently, a number of tests pass the level as it is (which is in string form) from YAML definitions to various method parameters, which is in contradiction with published documentation requiring level to be a symbol.

      Some commands appear to specifically handle read concern and convert the level to a string; other commands do not perform this conversion. It is my impression that, if an application passes read concern as documented in symbol form to the driver, a number of operations will fail due to the read concern being serialized as a symbol rather than a string.

      To address this:

      1. The tests will convert read concern levels to symbols, as per the driver's published API documentation.
      2. The operations will convert read concern levels to strings.
      3. Linter needs to be adjusted to allow for indifferent access provided by Mongo::Options when used with read concerns.

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

              Created:
              Updated:
              Resolved: