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

Some implicit sessions are used for one operation only

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Sessions, Spec Comp
    • Labels:

      My reading of the sessions spec suggests that implicit sessions are subject to pooling, just as explicit sessions are. However our current implementation of with_session ends implicit sessions as soon as the operation using them finishes:

          def with_session(client, options = {})
            session = get_session(client, options)
            yield(session)
          ensure
            session.end_session if (session && session.implicit?)
          end
      

      Other code in the driver maintain implicit sessions for more time, for example cursor iteration, but those are still not pooled.

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

              Created:
              Updated: