Close ChangeStream cursor when the resume token is missing.

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.6
    • Affects Version/s: None
    • Component/s: API
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      ChangeStreams raise an error when the resume token is not found in the current change document however, the underlying cursor is left open.

      We should close the cursor before raising an error here: https://github.com/mongodb/mongo-python-driver/blob/fdf4436201065e77a3d67c7c3d92be721bc7e20e/pymongo/change_stream.py#L116

      Thanks emily.stolfo for pointing this out.

              Assignee:
              Shane Harvey
              Reporter:
              Shane Harvey
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: