While investigating PHPLIB-461, I realised that the ServerException for a failing getMore call doesn't expose the errorLabels property of the server error. The response to the getMore command is as follows:
{ "ok" : 0, "errmsg" : "Encountered an event whose _id field, which contains the resume token, was modified by the pipeline. Modifying the _id field of an event makes it impossible to resume the stream from that point. Only transformations that retain the unmodified _id field are allowed. Expected: { _id: { _data: \"825D4413A3000000022B022C0100296E5A100490D142D8D37F42D8958D13185F66D4E346645F696400645D4413A3A64A5AACF876FDFB0004\" } } but found: {}", "code" : 280, "codeName" : "ChangeStreamFatalError", "operationTime" : Timestamp(1564742565, 2), "$clusterTime" : { "clusterTime" : Timestamp(1564742565, 6), "signature" : { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) } }, "errorLabels" : [ "NonResumableChangeStreamError" ] }
However, the following check on ServerException::hasErrorLabel() fails, as the errorLabels property of the server exception is empty.
- related to
-
PHPLIB-461 Fix ChangeStream tests on sharded clusters
- Closed