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

Investigate tx num going backwards for a server session

    • Type: Icon: Task Task
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.8.0
    • Component/s: Sessions
    • Labels:
      None
    • Environment:
      Driver 2.8.0, Mongoid 7.0.2

      Possible scenario:

      • write is sent with tx_num=1, and fails
      • another operation is sent, tx_num is advanced to 2
      • original write is retried, using tx_num=1 which fails

      Environment is likely multithreaded puma on heroku.

      Could be due to driver clients being reused across threads, and then different threads snatching the same session object out of the session pool between the original write and the write retry. In which case we might need to mark a session "in use/holding" if we are deciding to retry a write, or maybe to not ever reuse sessions after they had retry-eligible errors happen on them.

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

              Created:
              Updated:
              Resolved: