-
Type: Sub-task
-
Resolution: Fixed
-
Priority: Critical - P2
-
Affects Version/s: None
-
Component/s: None
@Durran Jordan
The fix solves the original issue, but we got a crash in code added in the fix:
TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) at Connection.onMessage (/var/cache/npm/mongodb-4.12.0/lib/cmap/connection.js:177:51) at MessageStream.<anonymous> (/var/cache/npm/mongodb-4.12.0/lib/cmap/connection.js:61:60) at MessageStream.emit (events.js:400:28) at MessageStream.emit (domain.js:475:12) at /var/cache/npm/mongodb-4.12.0/lib/cmap/message_stream.js:151:16 at callbackTrampoline (internal/async_hooks.js:130:17)
In current git tree it is the file cmap/connection.ts, line 388
// Get the first orphaned operation description. const entry = this[kQueue].entries().next(); if (entry) { ==> const [requestId, orphaned]: [number, OperationDescription] = entry.value; // If the orphaned operation description exists then set it. operationDescription = orphaned; // Remove the entry with the bad request id from the queue. this[kQueue].delete(requestId); }
Seems, entry.value is 'undefined'.
There is no specific scenario, we got crash on production, with standalone mongod (without replica set).
Should we open new issue?