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

ChangeStreams should account for missing operationTime in aggregate command response

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • 3.11
    • None
    • None

    Description

      Currently, we assume that the server's command response to a changeStream aggregation query will contain the operationTime field. Consequently, we record the start_at_operation_time parameter upon change stream creation as follows:

      self._start_at_operation_time = result["operationTime"]
      

      However, it seems that the server might not always include the operationTime field in its command-responses (see e.g. PYTHON-2177). Consequently, it might be a good idea to not rely upon the presence of this field:

      self._start_at_operation_time = result.get("operationTime")
      

      We should consider making this change and also updating the change streams specification once we get a definitive answer to HELP-14870

      Attachments

        Issue Links

          Activity

            People

              prashant.mital Prashant Mital (Inactive)
              prashant.mital Prashant Mital (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: