Created
November 6, 2012 21:21
-
-
Save mfrobben/4027649 to your computer and use it in GitHub Desktop.
Mongo db input / output when running convertToCapped
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create a db instance via driver | |
var db = new Db(self.database, serverConnection, dbOptions); | |
db.open(function(err, _db){ | |
// works fine | |
} | |
db.command({"convertToCapped": collectionName, size: collOptions.size}, | |
function(err, result){ | |
console.log('err', err) | |
console.log('result', result) | |
} | |
) | |
// Returns the following output: | |
// err null | |
// result { errmsg: 'cloneCollectionAsCapped failed: { errmsg: "exception: source collection 507-test.queue does not exist", code: 10301, ok: 0.0 }', ok: 0 } | |
// Expected Result: | |
// err {errmsg: ...} | |
// result null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment