[00:21:46] <imsky> is there a way to sort, say, a webpage by visits and then alphabetically? doing .sort({visits:1, name:1}) doesn't do the right thing
[00:48:45] <rafaelhbarros> ok, cheeser, which language you use mongo with?
[01:34:28] <Gaddel> is there a way to "freeze" a cursor, so that if the cursor isn't iterated over but if you have the cursor and then insert another document after, the cursor won't include the new document?
[02:11:30] <Gaddel> is there a way to "freeze" a cursor, so that if the cursor isn't iterated over but if you have the cursor and then insert another document after, the cursor won't include the new document?
[04:49:51] <k_sze[work]> The config server databases of my cluster are eating up more than 3 GB each. I don't like that.
[04:50:27] <k_sze[work]> Is there a way I can shrink them *post-deployment*?
[04:56:36] <OilFanInYYC> Hey I have a question about MongoDB 2.4.6. I have a collection setup with a bunch of hockey games listed with HOME & VISITOR. When I run $or query on those particular fields I am getting 0 documents returned. I can run the query on each separately and get a response but as $or nothing.
[04:57:58] <OilFanInYYC> Here is a sample of the data: { "visitor" : "MIN", "home" : "PHX", "season" : 20132014, "gametype" : 2 }
[10:22:41] <mark____> http://pastebin.com/dcj2EqsA ...i want to login via url beccause i also check the other aspects of login ..please help me if you can.Really need help Noders
[11:27:46] <hyperboreean> is there any admin command to check if data is being sent to a particular socket ?
[11:52:28] <Number6> stop mongodb on the secondary, and delete everything in --dbPath. When you restart MongoDB on the secondary, you can do an rs.initiate() on the primary
[11:52:45] <Number6> How much data does your primary have?
[12:02:14] <talbott> (basically, i thought i was working on the primary when i was setting this up)
[12:02:52] <Number6> You can leave it in the config file - provided the name is the same on both of them, that's all you need to tell the secondary "hey, you're part of the applkes replicaset"
[12:22:16] <Number6> I'm a sysadmin by trade - I'd always take another data bearing node (i.e. another secondary) over an arbiter. If stuff hits the fan, you can still chug along
[12:22:38] <talbott> damn though, i should've cloned my secondary before starting the rep
[12:22:45] <talbott> you know what question is coming next...
[12:23:01] <Number6> "Have you ever put a cow through a mincing machine?"
[12:26:55] <Number6> Ah yeah - similar concept, though
[12:27:07] <talbott> yeh - the server will be a complete clone, with these files on it
[12:27:18] <talbott> so i need to change any mongo.conf settings?
[12:27:23] <Number6> Just be sure there's enough time for the new machine to rejoin the set - either from an rsync or file based copy, or an inital sync.
[12:27:43] <talbott> or can i go with the clone and just do an rs.add from the primary?
[12:27:43] <Number6> If you're in MMS, keep an eye on the "Replica" graph. The more, the better
[12:28:00] <Number6> You don't need to change the config file on the primary, just an rs.add()
[12:28:51] <talbott> i'm not but i should be, is it free?
[12:39:41] <spicewiesel> I have a problem with my replicaSet. There are 3 members, sometimes both secondaries get very slow, not the system itself (ram free and low systemload) but the login to mongod lasts minutes. There are no issues in the logfile and mongod is still posting to the logfile, that seems to be ok. The problem is that nagios gets timouts while checking replication lags etc. While this happens the Primary is completely reliable. Does an
[12:40:56] <kali> spicewiesel: you irc client cut at "Does
[14:34:59] <talbott_> is it normal to wait this long?
[14:35:24] <Number6> Nope. What do the logs say? Put them up on pastebin, and /msg me the link
[15:48:46] <counterwall> I want to do bulk inserts, but in a thread-safe way. Currently, I'm using upserts to do my inserts, but I can only insert one document at a time. Is there a way where I can get the bulk inserts while still having the insert be thread safe?
[16:11:28] <elux> does anyone have a suggestion on now to model a linked list of documents in a collection?
[16:12:11] <elux> an incrementing index like 1,2,3,4,etc. isn't great if documents need to be reordered.. or you can do blocks like 10, 20, 30, etc. will work.. but.. its not great..
[16:12:36] <elux> im actually thinking of using a float for the index instead.. but i wonder if someone has even a better idea
[16:18:21] <kali> elux: float are ok... you may need to rebalance them at some point
[16:18:21] <counterwall> elux, why not just have a field that references previous and next?
[18:28:24] <Gaddel> is there any way to "freeze" a cursor, so that once the cursor is obtained, other documents inserted won't affect it and won't be in the iterated results?
[18:38:33] <cheeser> that's called a transaction, and no. :)
[18:39:16] <Gaddel> cheeser: ...is that really a transaction?
[18:46:41] <Gaddel> cheeser: well, I just mean on the application side, not the db side
[18:46:43] <cheeser> how would the application manage that?
[18:46:48] <Gaddel> c = something.find(); db.insert(doc); print list(c) (in python)
[18:46:59] <Gaddel> so the new doc won't be printed, only what was seen when the cursor was first acquired. though I guess I can't have both "frozen" and "lazy"
[18:46:59] <cheeser> that'd asking an inordinate amount of state management on the part of the driver.
[18:47:02] <cheeser> (setting aside the obvious data integrity and durability concerns)
[18:47:11] <Gaddel> however I was under the impression that once you begin iterating a cursor, the cursor will actually be frozen, even if you've only stepped past the first result
[18:47:27] <cheeser> there might be some internal cursor state that tracks which document IDs it's viewing but i've not heard of such a thing.
[18:47:29] <cheeser> you could use your code above to test it, though.
[18:47:57] <Gaddel> cheeser: it does in fact seem to freeze it
[18:48:05] <Gaddel> cheeser: though interestingly, because of this, cursor.count() != number of iterations when doing this
[18:53:08] <airandfingers> when i run "sudo service mongodb start" (ubuntu), the service doesn't actually start, but it works fine when i run the command from /etc/init/mongodb.conf: "sudo mongod -f /etc/mongodb.conf".. what's the difference?
[20:05:50] <airandfingers> when i run "sudo service mongodb start" (ubuntu), the service doesn't actually start, but it works fine when i run the command from /etc/init/mongodb.conf: "sudo mongod -f /etc/mongodb.conf".. what's the difference?
[20:10:53] <Number6> airandfingers: What version of Ubuntu?
[20:11:07] <Number6> And how was it installed? (10gen repos?)
[20:16:47] <airandfingers> Number6: 10.04, and we downloaded mongodb-10gen_2.4.6_amd64.deb from mongodb.org
[20:18:06] <Number6> Ok. You might be missing a few lines from /etc/init.d/mongodb -- that's where the config file defaults are set, IIRC
[20:19:05] <airandfingers> i dug through those scripts a bit, it looks like /etc/init.d/mongodb just points to /etc/init/mongodb, which has the command i'm trying to copy:
[20:19:26] <airandfingers> err, make that /etc/init/mongodb.conf
[20:19:39] <airandfingers> if [ "x$ENABLE_MONGODB" = "xyes" ]; then exec start-stop-daemon --start --quiee t --chuid mongodb --exec /usr/bin/mongod --config /etc/mongodb.conf; fi
[20:19:58] <airandfingers> the last part of that (/usr/bin/mongod --config /etc/mongodb.conf) is what i'm trying on the command line, and it's working just fine
[20:20:54] <Number6> Are the permissions all ok on the config file?