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

nil session is not handled in write_worker

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.19.4
    • Affects Version/s: 2.19.2, 2.19.3
    • Component/s: Sessions
    • Labels:
      None

      I came across an issue while using version 2.19.2 and 2.19.3 with mongodb 3.6 in a setup with a primary and 2 replicas.
      In write_worker.rb line 107 there is this bit of code session&.client.options[:retry_writes] which seems to have been thought to handle a nil session but not implemented completely as when the session is nil the client will be nil and will crash on accessing options. If I downgrade to 2.18.3 it's working fine as this bit of code isn't there.

       

      Source: https://github.com/mongodb/mongo-ruby-driver/discussions/2811

            Assignee:
            dmitry.rybakov@mongodb.com Dmitry Rybakov
            Reporter:
            dmitry.rybakov@mongodb.com Dmitry Rybakov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: