-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: 8.0.9
-
Component/s: None
-
None
-
Query Execution
-
ALL
-
-
None
-
3
-
TBD
-
None
-
None
-
None
-
None
-
None
-
None
-
0
A change stream cannot be resumed with a resume token when using a `$match` pipeline to filter documents. The following error is raised:
{{
{"t":\{"$date":"2025-05-28T11:23:14.569+00:00"},"s":"W", "c":"QUERY", "id":23799, "ctx":"conn13","msg":"Aggregate command executor error","attr":{"error":{"code":280,"codeName":"ChangeStreamFatalError","errmsg":"cannot resume stream; the resume token was not found. {_data: \"826836F222000000012B042C0100296E5A10041926BFB122484A969C7373B4F22F1AFB463C6F7065726174696F6E54797065003C64656C6574650046646F63756D656E744B657900461E5F69640029000004\"}"},"stats":{},"cmd":{"aggregate":"testCollection","pipeline":[{"$changeStream":{"fullDocument":"updateLookup","resumeAfter":
{"_data":"826836F221000000092B042C0100296E5A10041926BFB122484A969C7373B4F22F1AFB463C6F7065726174696F6E54797065003C7570646174650046646F63756D656E744B657900461E5F6964002B10000004"}}},{"$match":{"$or":[
{"fullDocument.filter":true},{"operationType":"delete"}]}}],"cursor":{"batchSize":2147483647},"$db":"testDatabase","$clusterTime":{"clusterTime":{"$timestamp":{"t":1748431394,"i":1}},"signature":{"hash":{"$binary":{"base64":"AAAAAAAAAAAAAAAAAAAAAAAAAAA=","subType":"0"}},"keyId":0}},"lsid":{"id":{"$uuid":"6ba6d71a-8b34-460d-8ae3-daf59dae8855"}},"$readPreference":{"mode":"primaryPreferred"}}}}}}
The same pipeline works to filter documents when using startAtOperationTime(...) instead of resumeAfter(...). Also does resumeAfter(...) work with the same resume token when the $match pipeline is omitted.