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

ChangeStreams should account for missing operationTime in aggregate command response

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

      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

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

              Created:
              Updated:
              Resolved: