-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
Affects Version/s: 2.1.15
-
Component/s: Lambda
-
Environment:Node.js version 0.10.* or earlier
-
Empty show more show less
The following commit, introduced in v2.1.15:
https://github.com/mongodb/node-mongodb-native/commit/c08d201075f805004f1a0c10973d7f68c320dd55
Breaks the connector on Node.js v0.10.* or earlier, which makes the language compatibility publicised by MongoDB incorrect:
https://docs.mongodb.org/ecosystem/drivers/node-js/#language-compatibility
This appears to be caused because CleartextStream does not have a unref method until Node.JS v0.12.*.
This causes stack traces like the following when using the driver:
2016-04-06T20:43:16.426Z 0c8bbaae-fc38-11e5-8e9a-fbf0b36828e1 TypeError: Object #<CleartextStream> has no method 'unref' at Connection.destroy (/var/task/node_modules/lambda-libs/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:441:21) at /var/task/node_modules/lambda-libs/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:189:7 at Array.forEach (native) at Pool.destroy (/var/task/node_modules/lambda-libs/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:182:15) at Server.destroy (/var/task/node_modules/lambda-libs/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:1040:31) at Server.close (/var/task/node_modules/lambda-libs/node_modules/mongodb/lib/server.js:398:17) at Db.close (/var/task/node_modules/lambda-libs/node_modules/mongodb/lib/db.js:357:19) at /var/task/node_modules/lambda-libs/node_modules/mongodb/lib/mongo_client.js:312:14 at /var/task/node_modules/lambda-libs/node_modules/mongodb/lib/db.js:234:5 at connectHandler (/var/task/node_modules/lambda-libs/node_modules/mongodb/lib/server.js:306:7)