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

Document allowing or disallowing session use with different clients

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Docs
    • Labels:
      None

      The code requires that when a session is supplied to an operation, the cluster of the client that created the session is the same as the cluster of the client that is executing the operation. This allows creating sub-clients via #with and using a session across these clients, if the options given to #with do not require a new cluster to be created.

      We have a test which, according to its description, seemingly prohibits using a session on any client other than the one which created the session. This test used a client with `retry_writes: true` set, which ruby-1459 makes into a crud option which then reuses the cluster, and therefore that test is failing as the code allows session to be used on a different client with the same cluster.

      Our docs are silent on when a session can be used on another client. We need to decide if reuse is ok if clusters match, and update the docs either way.

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

              Created:
              Updated: