Read preference is incorrectly handled by session/transaction code

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 2.6.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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 (Inactive)
              Reporter:
              Oleg Pudeyev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: