-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
ALL
-
-
Query 2019-11-18, Query 2019-12-02, Query 2019-12-16
For $changeStream, if the initial aggregate command specifies an explicit maxTimeMS and the work of constructing the first batch takes longer than maxTimeMS, the command will fail with ErrorCodes::MaxTimeMSExpired despite the fact that this is a tailable awaitData cursor.
Full log line of one such command failing:
2019-10-18T05:29:42.763+0000 I COMMAND [conn1316] command local.oplog.rs command: aggregate { aggregate: "fts", cursor: {}, maxTimeMS: 1000, pipeline: [ { $changeStream: { startAfter: { _data: "825DA9470E000000012B0229296E04" }, fullDocument: "updateLookup" } } ], $db: "test", $clusterTime: { clusterTime: Timestamp(1571376579, 1), signature: { hash: BinData(0, 00F7C4A3426B593FA553F668DD7DBA4E1C0B6F33), keyId: 6745581691277934593 } }, lsid: { id: UUID("3655f6dd-aabb-49e7-b582-b1459d4c879b") }, $readPreference: { mode: "primaryPreferred" } } planSummary: COLLSCAN numYields:58 ok:0 errMsg:"Error in $cursor stage :: caused by :: operation exceeded time limit" errName:MaxTimeMSExpired errCode:50 reslen:285 locks:{ ReplicationStateTransition: { acquireCount: { w: 61 } }, Global: { acquireCount: { r: 61 } }, Database: { acquireCount: { r: 60 } }, Collection: { acquireCount: { r: 1 } }, Mutex: { acquireCount: { r: 3 } }, oplog: { acquireCount: { r: 59 } } } protocol:op_msg 1103ms