Skip to content

Commit

Permalink
Merged master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
christkv committed Dec 16, 2011
2 parents cef2642 + 159baf0 commit 0e46a09
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 4 additions & 2 deletions HISTORY
Expand Up @@ -2,8 +2,10 @@
- Allow multiple bson docs to be serialized in bson parser in one go (avoid context switch on c++ driver)
- Amortize documents (only deserialize when accessed)
- New C++ serializer code (based on js)
- MongoS tests
- Better error handling for MongoS situation ()
- Mongo tests to handle special Mongos situations

0.9.7.2-2 2011-12-16
* Fixes infinite streamRecords QueryFailure fix when using Mongos (Issue #442)

0.9.7.2-1 2011-12-16
* ~10% perf improvement for ObjectId#toHexString (Issue #448, https://github.com/aheckmann)
Expand Down
9 changes: 8 additions & 1 deletion lib/mongodb/cursor.js
Expand Up @@ -610,7 +610,14 @@ Cursor.prototype.streamRecords = function(options) {
self.getMoreCommand = new GetMoreCommand(self.db, self.collectionName, queryCommand.numberToReturn, result.cursorId);
}

if (result.documents && result.documents.length) {
var resflagsMap = {
CursorNotFound:1<<0,
QueryFailure:1<<1,
ShardConfigStale:1<<2,
AwaitCapable:1<<3
};

if(result.documents && result.documents.length && !(result.responseFlag & resflagsMap.QueryFailure)) {
try {
result.documents.forEach(function(doc){
if (recordLimitValue && emittedRecordCount>=recordLimitValue) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{ "name" : "mongodb"
, "description" : "A node.js driver for MongoDB"
, "keywords" : ["mongodb", "mongo", "driver", "db"]
, "version" : "0.9.7-2-1"
, "version" : "0.9.7-2-2"
, "author" : "Christian Amor Kvalheim <christkv@gmail.com>"
, "contributors" : [ "Aaron Heckmann",
"Christoph Pojer",
Expand Down

0 comments on commit 0e46a09

Please sign in to comment.