Added Mongos connection type with a fallback list for mongos proxies, supports ha (on by default) and will attempt to reconnect to failed proxies.
Documents can now have a toBSON method that lets the user control the serialization behavior for documents being saved.
Gridstore instance object now works as a readstream or writestream (thanks to code from Aaron heckmann (https://github.com/aheckmann/gridfs-stream)).
Fix gridfs readstream (Issue #607, https://github.com/tedeh).
Added disableDriverBSONSizeCheck property to Server.js for people who wish to push the inserts to the limit (Issue #609).
Fixed bug where collection.group keyf given as Code is processed as a regular object (Issue #608, https://github.com/rrusso2007).
Case mismatch between driver’s ObjectID and mongo’s ObjectId, allow both (Issue #618).
Cleanup map reduce (Issue #614, https://github.com/aheckmann).
Add proper error handling to gridfs (Issue #615, https://github.com/aheckmann).
Ensure cursor is using same connection for all operations to avoid potential jump of servers when using replicasets.
Date identification handled correctly in bson js parser when running in vm context.
Documentation updates
GridStore filename not set on read (Issue #621)
Optimizations on the C++ bson parser to fix a potential memory leak and avoid non-needed calls
Added support for awaitdata for tailable cursors (Issue #624)
Replicaset now returns when the master is discovered on db.open and lets the rest of the connections happen asynchronous. - ReplSet/ReplSetServers emits "fullsetup" when all servers have been connected to
Prevent callback from executing more than once in getMore function (Issue #631, https://github.com/shankar0306)
Corrupt bson messages now errors out to all callbacks and closes up connections correctly, Issue #634
Replica set member status update when primary changes bug (Issue #635, https://github.com/alinsilvian)
Fixed auth to work better when multiple connections are involved.
Default connection pool size increased to 5 connections.
Fixes for the ReadStream class to work properly with 0.8 of Node.js
Added explain function support to aggregation helper
Added socketTimeoutMS and connectTimeoutMS to socket options for repl_set.js and server.js
Fixed addUser to correctly handle changes in 2.2 for getLastError authentication required
Added index to gridstore chunks on file_id (Issue #649, https://github.com/jacobbubu)
Fixed Always emit db events (Issue #657)
Close event not correctly resets DB openCalled variable to allow reconnect
Added open event on connection established for replicaset, mongos and server
Much faster BSON C++ parser thanks to Lucasfilm Singapore.
Refactoring of replicaset connection logic to simplify the code.
Add options.connectArbiter to decide connect arbiters or not (Issue #675)
Minor optimization for findAndModify when not using j,w or fsync for safe
Fixed error handling for findAndModify while still working for mongodb 1.8.6 (Issue #450).
Added getTimestamp() method to objectID that returns a date object
Work around for issues with findAndModify during high concurrency load, insure that the behavior is the same across the 1.8.X branch and 2.X branch of MongoDb
Reworked multiple db’s sharing same connection pool to behave correctly on error, timeout and close
EnsureIndex command can be executed without a callback (Issue #438)
Better handling of dead server for single server instances
FindOne and find treats selector == null as {}, Issue #403
Added replay of commands issued to a closed connection when the connection is re-established
Fix isConnected and close on unopened connections. Issue #409, fix by (https://github.com/sethml)
Moved reaper to db.open instead of constructor (Issue #406)
Fixes for handling of errors during shutdown off a socket connection
Correctly applies socket options including timeout
Cleanup of test management code to close connections correctly
Handle parser errors better, closing down the connection and emitting an error
Correctly emit errors from server.js only wrapping errors that are strings
Added priority setting to replicaset manager
Added correct handling of passive servers in replicaset
Reworked socket code for simpler clearer handling
Correct handling of connections in test helpers
Refactored test helper classes for replicaset tests
Fixed memory leak in cursor.toArray
Fixed bug in command creation for mongodb server with wrong scope of call
Added db(dbName) method to db.js to allow for reuse of connections against other databases
Added Long.fromString to c++ class and fixed minor bug in the code (Test case for $gt operator on 64-bit integers, Issue #394)
FindOne and find now share same code execution and will work in the same manner, Issue #399
Fix for tailable cursors, Issue #384
Fix for Cursor rewind broken, Issue #389
Allow Gridstore.exist to query using regexp, Issue #387, fix by (https://github.com/kaij)
Updated documentation on https://github.com/christkv/node-mongodb-native
Fixed toJSON methods across all objects for BSON, Binary return Base64 Encoded data
Reworked bson.js parser to get rid off Array.shift() due to it allocating new memory for each call. Speedup varies between 5-15% depending on doc
Reworked bson.cc to throw error when trying to serialize js bson types
Added MinKey, MaxKey and Double support for JS and C++ parser
Reworked socket handling code to emit errors on unparsable messages
log : function(message, object) {}, error : function(errorMessage, errorObject) {}, debug : function(debugMessage, object) {},
}
Usage is new Db(new Server(..), {logger: loggerInstance})