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

Read preference is incorrectly handled by session/transaction code

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.1
    • Affects Version/s: None
    • Component/s: None
    • None

      txn_read_pref takes `@client.read_preference` and pastes it into the `$readPreference` in the document sent to the server. The problem is that the former is using underscore naming and the latter camel case. The result is server error like so:

      [2018/07/05 13:34:49.695] Mongo::Error::OperationFailure:
      [2018/07/05 13:34:49.695] Could not parse $readPreference mode 'primary_preferred'. Only the modes 'primary', 'primaryPreferred', secondary', 'secondaryPreferred', and 'nearest' are supported. (9)

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

              Created:
              Updated:
              Resolved: