Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1880

Raise a warning when no_cursor_timeout is used with an implicit session

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.12, 4.0
    • None
    • None

    Description

      It is very unexpected that a cursor created with no_cursor_timeout=True can still timeout (as described in DOCS-11255 and PYTHON-1879). We should raise an informative warning in this case:

      >>> client.t.t.find(no_cursor_timeout=True)
      __main__:1: UserWarning: use an explicit session with no_cursor_timeout=True otherwise the cursor may still timeout after 30 minutes, for more info see DOCS-11255
      <pymongo.cursor.Cursor object at 0x10aef82b0>
      

      Attachments

        Issue Links

          Activity

            People

              shane.harvey@mongodb.com Shane Harvey
              shane.harvey@mongodb.com Shane Harvey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: