From 451c5b40fd092c25013084755f7ae71bb77cda1e Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 16 Sep 2014 13:10:30 -0400 Subject: [PATCH] removed debug --- src/database/mongo/hash.js | 9 --------- src/database/mongo/helpers.js | 2 -- src/database/mongo/sets.js | 4 ---- 3 files changed, 15 deletions(-) diff --git a/src/database/mongo/hash.js b/src/database/mongo/hash.js index f5659377a3..791cbc12cc 100644 --- a/src/database/mongo/hash.js +++ b/src/database/mongo/hash.js @@ -25,10 +25,6 @@ module.exports = function(db, module) { }; module.getObjects = function(keys, callback) { - if (keys.length > helpers.KEY_LIMIT) { - var e = new Error('too many keys'); - winston.warn('[HASH - TOO_MANY_KEYS] ' + keys.length + ' ' + keys[0] + ' ' + keys[keys.length - 1] + '\n', e.stack); - } db.collection('objects').find({_key: {$in: keys}}, {_id: 0}).toArray(function(err, data) { if(err) { return callback(err); @@ -59,11 +55,6 @@ module.exports = function(db, module) { }; module.getObjectsFields = function(keys, fields, callback) { - if (keys.length > helpers.KEY_LIMIT) { - var e = new Error('too many keys'); - winston.warn('[HASH - TOO_MANY_KEYS] ' + keys.length + ' ' + keys[0] + ' ' + keys[keys.length - 1] + '\n', e.stack); - } - var _fields = { _id: 0, _key: 1 diff --git a/src/database/mongo/helpers.js b/src/database/mongo/helpers.js index 7a4c160bb8..e74c3fb373 100644 --- a/src/database/mongo/helpers.js +++ b/src/database/mongo/helpers.js @@ -34,6 +34,4 @@ helpers.valueToString = function(value) { helpers.noop = function() {}; -helpers.KEY_LIMIT = 300; - module.exports = helpers; \ No newline at end of file diff --git a/src/database/mongo/sets.js b/src/database/mongo/sets.js index d247a1f945..b70b3a044a 100644 --- a/src/database/mongo/sets.js +++ b/src/database/mongo/sets.js @@ -123,10 +123,6 @@ module.exports = function(db, module) { }; module.getSetsMembers = function(keys, callback) { - if (keys.length > helpers.KEY_LIMIT) { - var e = new Error('too many keys'); - winston.warn('[SET - TOO_MANY_KEYS] ' + keys.length + ' ' + keys[0] + ' ' + keys[keys.length - 1] + '\n', e.stack); - } db.collection('objects').find({_key: {$in: keys}}, {_key: 1, members: 1}).toArray(function(err, data) { if (err) { return callback(err);