-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
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
- is related to
-
PYTHON-2177 Failed to start change stream (KeyError: 'operationTime')
-
- Closed
-