Skip to content

Commit f8dbce4

Browse files
committed
updated mongodb-core to 1.3.13 and version to 2.1.14
1 parent d150bd3 commit f8dbce4

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

HISTORY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2.1.14 2016-03-29
2+
-----------------
3+
* Updated mongodb-core to 1.3.13.
4+
* Handle missing cursor on getMore when going through a mongos proxy by pinning to socket connection and not server.
5+
16
2.1.13 2016-03-29
27
-----------------
38
* Updated mongodb-core to 1.3.12.

lib/apm.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var basicTimestampGenerator = {
2727
current: function() {
2828
return new Date().getTime();
2929
},
30-
30+
3131
duration: function(start, end) {
3232
return end - start;
3333
}
@@ -59,7 +59,7 @@ var Instrumentation = function(core, options, callback) {
5959
var instrumentations = []
6060

6161
// Classes to support
62-
var classes = [GridStore, OrderedBulkOperation, UnorderedBulkOperation,
62+
var classes = [GridStore, OrderedBulkOperation, UnorderedBulkOperation,
6363
CommandCursor, AggregationCursor, Cursor, Collection, Db];
6464

6565
// Add instrumentations to the available list
@@ -165,7 +165,7 @@ var Instrumentation = function(core, options, callback) {
165165
commandObj.ordered = options.ordered != undefined ? options.ordered : true;
166166
} else if(x == 'insert' || x == 'update' || x == 'remove' && this.lastIsMaster().maxWireVersion >= 2) {
167167
// Skip the insert/update/remove commands as they are executed as actual write commands in 2.6 or higher
168-
return func.apply(this, args);
168+
return func.apply(this, args);
169169
}
170170

171171
// Get the callback
@@ -176,7 +176,7 @@ var Instrumentation = function(core, options, callback) {
176176

177177
// Get a connection reference for this server instance
178178
var connection = this.s.pool.get()
179-
179+
180180
// Emit the start event for the command
181181
var command = {
182182
// Returns the command.
@@ -229,7 +229,7 @@ var Instrumentation = function(core, options, callback) {
229229
}
230230

231231
self.emit('failed', command);
232-
} else if(commandObj && commandObj.writeConcern
232+
} else if(commandObj && commandObj.writeConcern
233233
&& commandObj.writeConcern.w == 0) {
234234
// If we have write concern 0
235235
command.reply = {ok:1};
@@ -425,7 +425,7 @@ var Instrumentation = function(core, options, callback) {
425425

426426
// Set up the connection
427427
var connectionId = null;
428-
428+
429429
// Set local connection
430430
if(this.connection) connectionId = this.connection;
431431
if(!connectionId && this.server && this.server.getConnection) connectionId = this.server.getConnection();
@@ -465,8 +465,8 @@ var Instrumentation = function(core, options, callback) {
465465
self.emit('started', command)
466466

467467
// Emit succeeded event with killcursor if we have a legacy protocol
468-
if(command.commandName == 'killCursors'
469-
&& this.server.lastIsMaster()
468+
if(command.commandName == 'killCursors'
469+
&& this.server.lastIsMaster()
470470
&& this.server.lastIsMaster().maxWireVersion < 4) {
471471
// Emit the succeeded command
472472
var command = {
@@ -497,7 +497,6 @@ var Instrumentation = function(core, options, callback) {
497497
// Emit the command
498498
self.emit('failed', command)
499499
} else {
500-
501500
// Do we have a getMore
502501
if(commandName.toLowerCase() == 'getmore' && r == null) {
503502
r = {
@@ -517,7 +516,7 @@ var Instrumentation = function(core, options, callback) {
517516
}
518517
} else if(commandName.toLowerCase() == 'killcursors' && r == null) {
519518
r = {
520-
cursorsUnknown:[cursor.cursorState.lastCursorId],
519+
cursorsUnknown:[cursor.cursorState.lastCursorId],
521520
ok:1
522521
}
523522
}
@@ -538,7 +537,7 @@ var Instrumentation = function(core, options, callback) {
538537

539538
// Return
540539
if(!callback) return;
541-
540+
542541
// Return to caller
543542
callback(err, r);
544543
});
@@ -605,4 +604,4 @@ Instrumentation.prototype.uninstrument = function() {
605604
this.removeAllListeners('failed');
606605
}
607606

608-
module.exports = Instrumentation;
607+
module.exports = Instrumentation;

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mongodb",
3-
"version": "2.1.13",
3+
"version": "2.1.14",
44
"description": "The official MongoDB driver for Node.js",
55
"main": "index.js",
66
"repository": {
@@ -14,7 +14,7 @@
1414
],
1515
"dependencies": {
1616
"es6-promise": "3.0.2",
17-
"mongodb-core": "1.3.12",
17+
"mongodb-core": "1.3.13",
1818
"readable-stream": "1.0.31"
1919
},
2020
"devDependencies": {

0 commit comments

Comments
 (0)