PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 21st of October, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[05:27:05] <SomeoneWeird> Is there a way I can force the mongo cli to automatically connect to a primary?
[05:36:38] <joannac> You mean the mongo shell?
[06:15:45] <SomeoneWeird> joannac, that i do, but i've figured out you can't run eval commands on secondaries so i've gone a different route :)
[06:24:47] <IrishGringo> is anyone doing the 10Gen Java class online?
[06:25:06] <IrishGringo> I am trying to get MongoClient to load in a project using inteliJ and Maven... but I am new to java and mongo
[07:02:57] <RaviTezu> Hi, i allowed reads to secondary nodes of a replica set using rs.slaveOk(), how can i revert it back?
[07:02:59] <RaviTezu> any help?
[07:17:59] <RaviTezu> Hi, i allowed reads to secondary nodes of a replica set using rs.slaveOk(), how can i revert it back?
[07:18:02] <RaviTezu> any help?
[08:04:04] <[AD]Turbo> hi there
[08:43:26] <acron^> hello, I am writing a custom aggregation pipeline operator and am looking for a little guidance on resolving $field references in queries, a la $project
[08:43:42] <acron^> { $newop : { entry_id : '$entry_id' }
[08:44:30] <acron^> I already have the operator 'registered', was just hoping for a direction for resolving that part of the query, as the code to do this already exists somewhere :)
[08:44:56] <Derick> you mean patching the mongod source?
[08:45:00] <acron^> Yes
[08:45:42] <Derick> hmm, probably best to email the -dev list
[08:46:43] <acron^> Okay, thanks
[08:50:43] <acron^> Ahhh, messages have to be approved
[08:50:57] <acron^> I was scratching my head as to why my posts weren't appearing...
[09:59:49] <remonvv> #algorhitms
[09:59:51] <remonvv> oops
[10:28:35] <abonilla> hi - is there a way to enable replication/sharding from within the mongodb.conf file instead of configuring from within the mongo shell?
[11:48:34] <IrishGringo> is anyone doing the 10Gen Java class online?
[11:48:35] <IrishGringo> I am trying to get MongoClient to load in a project using inteliJ and Maven... but I am new to java and mongo
[11:48:51] <Donatello> Hi everyone, i'm trying to activate the authentification whith mongodb on Sharded cluster (2 ReplicaSet), but i'm having an issue so i have a question does i have to set the option --auth and --keyfile ? or just --keyfile option? and does i have to set the option on every members o of my cluster or juste on each configServers ? Can someone Help me :) ?
[12:18:03] <IrishGringo> good morning, anyone here?
[12:22:57] <Donatello> Hi everyone, i'm trying to activate the authentification whith mongodb on Sharded cluster (2 ReplicaSet), but i'm having an issue so i have a question does i have to set the option --auth and --keyfile ? or just --keyfile option? and does i have to set the option on every members o of my cluster or juste on each configServers ? Can someone Help me :) ?
[12:45:17] <IrishGringo> I am new to java, and doing the 10Gen MongoDB course... but I am having trouble... I am trying to add a mongoClient maven repository... and I can not figure the routine out... could someone give me a hand on how to do this please
[12:46:00] <cheeser> why would you need a new maven repository?
[12:46:05] <cheeser> the driver jars are in central.
[12:46:21] <cheeser> you should just need to add those entries to your pom and be set.
[12:47:52] <IrishGringo> really... that is all there is to it?
[12:47:58] <IrishGringo> I will try
[12:49:25] <IrishGringo> actually, I am trying from a scratch project... could you walk me through this please... commandLineApp, ?
[12:51:15] <IrishGringo> do I have to add a pom file?
[12:52:17] <cheeser> well, maven requirees one.
[12:53:15] <IrishGringo> I am starting from a command line program... and I am trying to do the HW for 10Gen U... are you familiar with the HomeWork ( due today)?
[12:53:43] <IrishGringo> If you could just help me with the start, I am certain I can figure the coding out with out trouble.
[12:53:44] <cheeser> i'm not. i haven't done that course.
[12:53:51] <cheeser> are you familiar with maven?
[12:54:27] <IrishGringo> well... we have to use MongoClient, to use a Collection, and modify it...
[12:54:51] <IrishGringo> I spent hours playing with it last night... both on the command line and in IntelliJ...
[12:54:57] <IrishGringo> But I am missing something here...
[12:55:51] <IrishGringo> this is the assignment I am trying to figure out...
[12:55:53] <IrishGringo> https://education.mongodb.com/courses/10gen/M101J/2013_October/courseware/Week_2_-_CRUD/Homework_2.2/
[12:56:25] <IrishGringo> But I have to learn how to use the IDE sometime...
[12:57:28] <IrishGringo> so right now, I am tryng to add a archetype to my new app console project... but I can not find one for mongo...
[12:57:38] <IrishGringo> this is a java project btw
[12:58:02] <IrishGringo> I have tried to add archetypes... but it never works... the compile just crashes...
[12:58:10] <cheeser> http://search.maven.org/#artifactdetails|org.mongodb|mongo-java-driver|2.11.3|jar
[12:58:28] <cheeser> add that maven xml snippet to your pom's <dependencies> section
[12:59:02] <IrishGringo> so I have to create a blank POM file?
[12:59:20] <cheeser> you don't have one now?
[12:59:31] <cheeser> it'd be easier to just download the jar and point your IDE at that.
[12:59:46] <IrishGringo> I have experimented about 40 times... some do, and some dont
[12:59:56] <IrishGringo> this one is as plain as possible and it does not...
[13:00:00] <IrishGringo> I just tied to add one
[13:00:10] <IrishGringo> perhaps I should do a new MAVEN project?
[13:00:23] <IrishGringo> wait... this one does
[13:01:40] <IrishGringo> actully... no this one does not have a pom file
[13:03:09] <IrishGringo> I have to add it... which is one of my question.... from my project, I am doing FILE - NEW MODULE - MAVEN
[13:03:13] <IrishGringo> is that correct?
[13:03:29] <IrishGringo> MAVEN MODULE
[13:04:56] <cheeser> maven will be a good chunk to bite off while trying to learn an IDE *and* java *and* mongodb.
[13:05:08] <ron> hehe
[13:05:12] <cheeser> i'd suggest just downloading the jar and using it via the ide without maven
[13:07:59] <IrishGringo> the class requires maven... the ide seems to be optional, but recommended
[13:08:27] <IrishGringo> but they really dont explain it well in video.. and there are no docs to follow
[13:09:31] <IrishGringo> we are using spark and FreeMarker as well
[13:09:52] <acron^> Any mongodb devs in here?
[13:10:15] <IrishGringo> future dev.. hahah... more like clueless dev at the moment
[13:10:43] <IrishGringo> acron^: are you doing the 1ti sf?
[13:10:43] <acron^> :p
[13:11:05] <acron^> Nah, I meant contributors
[13:12:04] <acron^> Need some advice on patching the aggregation pipeline
[13:12:25] <IrishGringo> over my head...
[13:12:26] <cheeser> ask and let's see if anyone can help
[13:13:15] <acron^> I'm just looking for some direction regarding the resolving of '$field' values such as in $project
[13:13:18] <acron^> { $newop : { entry_id : '$entry_id' } }
[13:13:53] <cheeser> as i understand, those field names come from earlier stages
[13:14:03] <acron^> Obviously the code to replace this with a document field value already exists, I just need some one to point me in the right direction
[13:14:09] <cheeser> if $project is first, then those field names come from document properties in the collection
[13:14:45] <acron^> When the query arrives at my operator, it has not been replaced...and I am only passed a document
[13:14:58] <acron^> So I imaged there was some smooshing together of query and document I needed to do
[13:16:18] <cheeser> i don't understand what the problem is... are you trying to do string manipulation before you pass that string to mongo?
[13:16:47] <acron^> No
[13:16:55] <acron^> This is a patch to mongo source code
[13:17:04] <acron^> I have added a custom aggregation pipeline operator
[13:17:15] <acron^> similar to $project, $match etc
[13:17:26] <acron^> it looks like this:
[13:17:34] <acron^> { $newop : { entry_id : '$entry_id' } }
[13:18:32] <acron^> so, in code, I have my query and I have my document but I want to resolve that query so it reflects the field value of '$entry_id' as it appears in the current document I am processing
[13:18:58] <cheeser> oh. i have no idea on that.
[13:40:28] <oceanx> hi I've got a problem with mongodb, i have a standalone db and i was starting from this one to create a replicaSet
[13:40:36] <oceanx> but the one which i wished to be a secondary
[13:40:43] <oceanx> got to be the primary
[13:40:58] <oceanx> and my primary (with all my data) was doing a rollback
[13:41:06] <oceanx> now I've stopped the secondary
[13:41:27] <oceanx> and the primary and restarted without the replicaSet config
[13:41:42] <oceanx> but if I try to remove the other server
[13:41:51] <oceanx> it says that this command should be done on the primary
[13:42:16] <oceanx> Is there a way to force it being primary with the actually elected primary down?
[13:42:38] <Number6> oceanx: Yes. http://docs.mongodb.org/manual/tutorial/reconfigure-replica-set-with-unavailable-members/
[13:49:03] <oceanx> thank you Number6
[14:19:25] <Nomikos> How can I find all documents in which have a certain sub-field exists?
[14:20:18] <Nomikos> http://pastebin.com/hDacSafS
[14:20:33] <Nomikos> (where p is our products collection)
[14:21:23] <Nomikos> .. I think quoting the field name works.
[14:24:23] <cheeser> yeah, you'll need to wrap that property name in quotes
[14:26:51] <Nomikos> sometimes you have to bang your head against the desk for 15 minutes, try everything, and finally throw the question out into irc - before then, 20 seconds later, suddenly realizing the answer.
[14:27:06] <cheeser> you need a rubber duck.
[14:27:26] <cheeser> http://en.wikipedia.org/wiki/Rubber_duck_debugging
[14:27:28] <Nomikos> yeah
[14:27:44] <Nomikos> I know, but for this syntax issue it wouldn't have helped much I suspect
[14:36:00] <oceanx> everytime I add the new node
[14:36:05] <oceanx> it becomes primary
[14:36:12] <oceanx> and the old one with all the data secondary
[14:36:19] <oceanx> I also did force the stepDown
[14:36:43] <oceanx> the database which I want to replicate is 75GB
[14:36:58] <oceanx> maybe it's an optime problem or something like this
[14:37:13] <oceanx> I also tried to set the primary priority to 1
[14:37:16] <oceanx> and the secondary to 0
[14:37:19] <oceanx> but not working still
[14:37:44] <oceanx> any tips?
[14:37:59] <cheeser> can you pastebin how you're adding nodes?
[14:56:49] <oceanx> I'm following the tutorial
[14:56:58] <oceanx> so I just bring up the nodes
[14:57:03] <oceanx> and add to the primary
[14:57:14] <oceanx> with rs.add
[14:57:35] <cheeser> they shouldn't assume primary then...
[15:01:47] <oceanx> instead they do
[15:01:53] <oceanx> and I can't understand why :)
[15:01:59] <oceanx> now I've forced the stepdown
[15:02:06] <oceanx> on the one which I want to be secondary
[15:02:10] <oceanx> and it seems it's working
[15:02:20] <oceanx> but it's not doing the initial resync
[15:02:23] <cheeser> you're using the same replSet name when you start mongod with --replSet?
[15:02:33] <oceanx> set it in the conf "rs0"
[15:21:15] <tripflex> http://education.mongodb.com - node.js course starts today, and it's free! Join if you know what's good for you!
[15:26:08] <Nomikos> tripflex: do you know how much knowledge of node.js is required?
[15:26:18] <Nomikos> I planned to spend this weekend on that, but ... >.>
[15:26:33] <tripflex> as long as you have an understanding it should be fine
[15:26:39] <tripflex> i think it lists it on the course
[15:26:41] <tripflex> the pre reqs
[15:26:45] <Nomikos> yeah
[15:27:05] <tripflex> yeah so just have a basic understanding of js
[15:27:13] <tripflex> IMO
[15:27:16] <tripflex> if you know what a callback is
[15:27:18] <tripflex> you should be alright
[15:27:22] <Nomikos> it does in the short list on the right, on the left it just says javascript
[15:27:33] <Nomikos> cool, I can manage that much :-)
[15:27:46] <tripflex> either way it doesn't hurt
[15:27:47] <tripflex> to sign up
[15:27:50] <tripflex> it's free :D
[15:35:35] <Nomikos> If I can manage to finish one week it'll be the first time I've done homework in .. half my lifetime or so >.>
[15:41:09] <tripflex> haha yeah im really just interested in the certificate
[15:41:16] <tripflex> already proficient (i think) in mongodb
[15:41:24] <tripflex> but im sure ill learn something new
[15:42:25] <Nomikos> .. there is a certificate?
[15:44:40] <cheeser> yeah
[17:15:56] <saml> hello how can I give write access to clients that connect from certain ip?
[17:16:01] <saml> all other clients get read only access
[17:16:20] <saml> should i use two different users instead?
[17:16:36] <cheeser> i would think so, yes.
[17:16:36] <saml> i don't want to drop production datbase again
[17:16:56] <cheeser> heh. get that fixed, did you?
[17:17:24] <saml> spent two full days trying to recover dropped collections
[17:19:45] <cheeser> http://www.mongodb.com/blog/post/start-backing-mongodb-free-free-tier-mms-backup-now-available?utm_source=buffer&utm_campaign=Buffer&utm_content=buffer5292b&utm_medium=twitter
[17:24:32] <swulf--> What might cause this error? pymongo.errors.OperationFailure: command SON([('findAndModify', 'counters'), ('query', {'_id': 'myseq'}), ('update', {'$inc': {'seq': 1}})]) failed: no such cmd
[17:24:48] <swulf--> I'm using pymongodb's collection.find_and_modify() func
[17:25:06] <swulf--> would I get 'no such cmd' if the find query fails?
[17:28:43] <cesarkawakami> swulf--: you're trying to modify a document's _id? You can't do that.
[17:29:55] <swulf--> it "works" in v2.4.5
[17:30:57] <kali> cesarkawakami: i don't think he is
[17:31:18] <kali> swulf--: can't you use the driver helper ?
[17:31:25] <cesarkawakami> kali: you're right. I misread myseq, _id and seq
[17:31:55] <cesarkawakami> swulf--: ok, disregard my comment about an invalid command. This is probably happening because of the mongodb version.
[17:31:58] <swulf--> kali: er, i'm not super familiar with mongodb; what's that?
[17:32:03] <kali> swulf--: http://api.mongodb.org/python/current/api/pymongo/collection.html#pymongo.collection.Collection.find_and_modify
[17:32:29] <swulf--> requires server version 1.3.0 ?
[17:33:09] <swulf--> db version v1.4.4, pdfile version 4.5
[17:33:21] <swulf--> why is the debian build of mongodb so old?
[17:33:26] <kali> 1.4.4 ? wow
[17:33:44] <cesarkawakami> swulf--: debian binaries are known to be old.
[17:33:51] <swulf--> well, there's my answer
[17:33:54] <swulf--> guess i'm building mongodb
[17:33:56] <kali> swulf--: because mongodb .inc provides good packages. there is no incentive for a debian developper to re-do the work
[17:34:27] <cesarkawakami> swulf--: the mongodb distribution on the official site works out-of-the-box without compilation.
[17:34:35] <swulf--> thanks
[17:34:38] <swulf--> i'll install that one
[17:34:53] <kali> swulf--: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian/
[17:35:13] <rhalff> Hi I'm using _id inside my application code, if I send an update back to the server, should I first add _id: ObjectId(obj._id) to the incoming json before I save it?
[17:35:28] <rhalff> I don't like it, but I don't wanna change my application code for nw.
[17:35:29] <rhalff> now
[17:35:50] <cesarkawakami> rhalff: uh? incoming json?
[17:36:09] <rhalff> cesarkawakami, yeah, like a post or put in json
[17:36:25] <rhalff> I wanna save it back to the database, a put contains the the _id
[17:36:42] <kali> rhalff: that would make it work, but... it's quite dangerous
[17:37:26] <rhalff> kali, but I don't understand, how should I normally fetch a document? I should add an id property and when I use find, I should make sure I do not send the _id out?
[17:38:02] <rhalff> for me that _id thing is a little irritating :-) Now everywhere I must take that _id into account. It's there but I should not use it
[17:38:41] <swulf--> cool, it works now, thanks for you guys' help!
[17:38:44] <kali> rhalff: you don't have to use ObjectId as _id. use string or int if that makes your life easier
[17:39:31] <rhalff> kali, ok as quick fix I'll just use ObjectId before update then, later I'll redesign :) thanks
[17:41:43] <cesarkawakami> rhalff: the "feature" of ObjectId is that it's a reasonaly reliable distributed way of generating unique, more-or-less sequential ids
[17:42:16] <cesarkawakami> rhalff: just encapsulating another id as an ObjectID defeats the purpose. Better just to use your id directly.
[17:44:06] <rhalff> cesarkawakami, ok, right now my only unique id is the _id
[17:44:26] <rhalff> I guess I should make slugs or something to be the unique id.
[17:45:49] <cesarkawakami> rhalff: you can put them into _id if you want. _ids don't necessarily have to be ObjectIds. But, then again, experience has shown me that natural primary keys (as opposed to artificial ones) are to be avoided in a general sense.
[17:46:32] <rhalff> cesarkawakami, I won't mind keeping it, but then I would have to filter out _id before I send it to the client?
[17:47:32] <rhalff> or as a rule of thumb specify exactly what kind of fields I want to be returned.
[17:48:04] <cesarkawakami> rhalff: well, the _id is your "primary key", and getting your primary key back is usually a good thing
[17:49:08] <cesarkawakami> rhalff: sending it to the client doesn't sound like a bad idea to me, also. The only thing is that objectids are usually not directly serializable; you'd have to find out a way to serialize them (and usually you'd want that to be reversible)
[17:49:10] <rhalff> cesarkawakami, ok, curious how other people do it. who use ObjectId
[17:51:38] <cesarkawakami> rhalff: the way I do it (not necessarily the best) is to serialize it as {"$oid": "string representation of the objectid"}, because it's a representation mongodb uses in some cases (extended json)
[17:51:47] <rhalff> maybe it would be nice if _id was just something internal, something that would took some work to expose.
[17:53:15] <cesarkawakami> rhalff: you want to make your "primary key" hard to expose?
[17:53:16] <rhalff> cesarkawakami, my major bug was, that the client sends back the string representation, so I ended up with new records instead of updates, because they where not objectIds
[17:54:14] <cesarkawakami> rhalff: that's because your client-server protocol is wrong.
[17:54:15] <rhalff> cesarkawakami, no start with my own 'id', and have mongodb internally always have an _id of their own.
[17:55:23] <cesarkawakami> rhalff: that wastes space and processing time. But on the other hand, the _id field could be "renamable".
[17:56:18] <rhalff> cesarkawakami, what is wrong in my protocol.
[17:59:02] <cesarkawakami> rhalff: your json library probably isn't carelessly serializing objectids as strings. You probably explicitly made it do it. When you did that, you established a protocol to convert between the server internal representation (which has object ids) and something that's json serializable. But you probably forgot to do the reverse, which broke your protocol because then x != decode(encode(x))
[18:00:26] <cesarkawakami> rhalff: you should probably encapsulate the protocol logic somewhere so that (1) there's one true source for the protoco language and (2) you don't forget any aspect of the protocol when you use it.
[18:00:52] <cesarkawakami> rhalff: also, unit tests.
[18:01:00] <rhalff> I think it probably calls ObjectId().toString() which string concatenation already does automatically. so no magic there I think.
[18:01:14] <cesarkawakami> rhalff: which language is your server in?
[18:01:20] <rhalff> javascript
[18:01:28] <cesarkawakami> rhalff: oh.
[18:01:36] <cesarkawakami> rhalff: wait, string concatenation?
[18:01:51] <cesarkawakami> rhalff: why do you concatenate objectids with strings?
[18:03:04] <rhalff> I don't JSON.stringify(someObject) does. which I guess also automatically converts the id's into strings.
[18:03:19] <rhalff> ah well.. :)
[18:30:59] <samholmes> When starting mongod I get "ERROR: could not read from config file"
[18:41:18] <dllama> hi guys,
[18:42:01] <dxd828_> samholmes: does the user you are running mongos as have permission to read that file?
[18:42:15] <samholmes> what file?
[18:42:26] <dxd828_> The config file?
[18:43:33] <dllama> quick question, i'm trying to clean up my db to improve performance, was storing html/css as sepearate fields in the db with each document being a combined total of about 70-180kb. after hitting approximately 40k documents, i'm noticing huge delays. so in an attempt to clean that up, i'm completely removing those items from the db. its a rails app so in a local env i just did an each loop that sets those fields as "". yet my db
[18:44:41] <dxd828_> I have a question, on my single server mongodb install I have a single node connection and the mms stats+backup agent connecting. On the DB stats it shows about 988 connections, which seems high. After a few hours I can no longer open a new connection to the server. Any ideas? Nothing interesting in the logs :/
[18:46:11] <cesarkawakami> dxd828_: that seems high. I have mms stats (no backup) and a replicaset cluster with >100 clients connected, and my number of connections hovers around 160
[18:47:03] <dxd828_> cesarkawakami, yeah I thought so. My nodejs app only opens a single connection as far as I know so I don't know whats causing it :/
[18:53:12] <samholmes> dxd828: I didn't specify a config file
[18:54:04] <dxd828> samholmes so you're trying to start it without a config file?
[18:54:21] <samholmes> I'm running it just with `mongod`
[18:55:01] <samholmes> I don't have a config file. Isn't there a way to run it with default config?
[18:57:00] <samholmes> dxd828: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/ this doesn't mention anything about a config file
[18:58:38] <samholmes> dxd828: it does say something about it under "Use MongoDB from Official Builds" but I'm using homebrew
[18:59:18] <dxd828> samholmes: so what are you typing into the terminal to start mongod?
[18:59:30] <samholmes> `mongod`
[18:59:49] <samholmes> Just that ^
[19:00:38] <dxd828> samholmes: okay, I don't run mongod on Mac but why don't you create a config file and try that?
[19:01:28] <samholmes> How?
[19:01:34] <samholmes> What's the config file suppose to have?
[19:05:00] <dxd828> samholmes: Just add this (dbpath = /usr/local/mongodb/data) that should be enough.. and make sure the directory exists
[19:06:59] <samholmes> what's dbpath?
[19:14:29] <samholmes> I was able to find a default config file that was installed with homebrew.
[19:15:18] <samholmes> But, I don't want to have to specify the config file location every time I run mongod
[19:22:00] <samholmes> I'm looking into using launchctl to manage the mongod process. But
[19:23:39] <cheeser> that works...
[19:24:14] <kostil> hi all, have a question. joined a small company which uses mongodb with node, but all schema names are minified (ex. u1 instead of userId). I want to be able to use mongo console client while someone transforming the queries for find() and update() from normal to minified names based on config for each schema. is it possible to use mongo shell scripting to achive this and keep the interactive console?
[19:24:16] <kostil> thanks
[19:24:48] <cheeser> not really, no.
[19:26:30] <dxd828> samholmes: why not? It need's it config file just like any other application
[19:26:32] <dxd828> well unless the config file is in the default locationon mongo looks
[19:27:13] <samholmes> dxd828: Where does mongo look by default?
[19:31:23] <david___> Hello
[19:31:47] <david___> Is there anyone who can help me with my mongodb authentication issues?
[19:32:02] <cheeser> hard to tell until you ask.
[19:33:25] <david___> okay
[19:33:42] <david___> well since a couple of hours ago ive hired a vps
[19:33:59] <david___> And uhm ive installed mongodb. But i can now acces it without one authentication check
[19:34:19] <david___> I want to authenticate my request to the mongodb first
[19:34:38] <david___> Ive followed a guide to authenticate my mongodb but it doesnt work
[19:35:00] <david___> When i create an admin user, i cannot really use it i think
[19:36:19] <david___> the guide said that i had todo something like mongo --auth
[19:36:57] <david___> But when i do that i will get an error "dbpath (/data/db/) does not exist. "
[19:37:31] <cheeser> you have to give a --dbpath option pointing at your database files or create that path
[19:37:49] <david___> so
[19:37:52] <david___> I have to say
[19:38:02] <david___> mongod --dbpath etc/lib/
[19:38:58] <david___> wait
[19:39:07] <david___> var/lib/mongodb
[19:39:24] <david___> Do i have to say mongod --dbpath var/lib/mongodb
[19:40:02] <cheeser> probably with a leading / unless you run from / already
[19:40:49] <david___> okay now i get a exception
[19:41:12] <david___> exception in initAndListen: 10310 unable to lock file /var/lib/mongodb/mongod.lock
[19:45:25] <david___> cheeser can you help mee?
[19:45:41] <cheeser> i can't. have to go pick up the kid from school.
[19:45:47] <david___> okay
[19:45:49] <david___> When ur back?
[19:45:56] <david___> I would be really happy if you could
[20:10:09] <joannac> with a leading /
[20:11:46] <joannac> wait, david___
[20:12:01] <joannac> are you trying to run multiple mongod processes from the same folder?
[20:14:09] <david___> hello joannac
[20:14:23] <david___> How can i check that?
[20:15:17] <cheeser> each invocation to mongod needs a different --dbpath
[20:17:24] <joannac> david___: ps -Al | grep mongo
[20:20:18] <joannac> actually, that may depend on your OS. maybe ps -Alf
[20:20:29] <joannac> (good morning cheeser)
[20:20:58] <david___> joannac ill check
[20:21:33] <david___> i get no response from the terminal
[20:23:32] <david___> wait
[20:23:36] <david___> stupid fault of me
[20:23:43] <david___> mongo wasnt on
[20:23:44] <david___> haha
[20:23:49] <david___> Okay i get response now
[20:24:19] <david___> 4 S 105 3184 1 3 80 0 - 38815 poll_s ? 00:00:00 mo ngod
[20:24:33] <david___> Just one record
[20:30:19] <jiffe99> why would the primary member of a replica set have a syncingTo field in rs.status() ?
[20:31:36] <dllama> anyone mind helping me with mongorestore? its giving me "ERROR: don't know what to do with file [dump]"
[20:36:55] <cowstrike> 203 700.586 MiB 0.000 MiB not_none = lambda val: val if not val== None else []
[20:36:55] <cowstrike> 205 1031.613 MiB 331.027 MiB for item in cursor:
[20:36:55] <cowstrike> 206 1025.477 MiB -6.137 MiB x, y = item['x'], item['y']
[20:36:56] <cowstrike> Hi, I've got a question regarding memory usage when iterating over a cursor using pymongo. For some reason the memory balloons. This is the output from memory_profiler:
[20:37:10] <cowstrike> (the other way around ;-)
[20:37:57] <cowstrike> The documents that are returned are small. This profile is made when limiting the cursor for 30,000 objects
[20:39:55] <joannac> Yay, 2.4.7 has the fix for server-11032 !
[22:13:59] <vl4kn0> Hi, I have Nx16 array whose values are in range 0 - 255. Is there any way I could use mongo search facility to search in those arrays?
[22:14:35] <vl4kn0> the point here is that I probably cannot fit values up to 255 in a simple text
[22:32:36] <ginhinio> does mongo work on windows xp
[22:59:18] <joannac> 32- or 64-bit?
[23:08:09] <joannac> 32-bit has the 2gb data limit, and either way, do you really want to be using an OS which is going EOS in 6 months?
[23:16:15] <snkcld> with the "pull" modifier, is the element which is pulled returned? it seems that it is not for me
[23:16:35] <snkcld> otherwise, is it just the same as a remove?
[23:17:16] <joannac> a $pull is a remove, yes.
[23:17:37] <joannac> It does not return the array element(s) that are removed
[23:18:20] <snkcld> ah, so if i essentially want to toggle a value in an array, i would find() on the document, then check via javascript, and add or remove appropriately from there?
[23:18:53] <joannac> Um, what do you mean by toggle?
[23:21:38] <ginhinio> guys why doest mongo work on my windows xp pc
[23:21:47] <snkcld> well, i have a bunch of buttons with different values, and when they click on the button, it adds that buttons id to an array, but if its already in the array, then it removes it
[23:21:49] <ginhinio> i run a version below 2.2
[23:23:11] <joannac> snkcld: erm, it would ahve to be 2 updates I think
[23:23:39] <snkcld> eh, this is pretty much what im doing now http://i.imgur.com/IQcGM9z.png
[23:23:49] <snkcld> but it would just be cool if there was some sort of $toggle:
[23:24:03] <snkcld> heck, if $pull returned the data, then i could just check the return value to see if i need to add or not
[23:24:19] <ginhinio> .. i'm being ignored
[23:24:52] <snkcld> $pull just kinda sounds to me like, returning. as opposed to for example, a $remove
[23:25:15] <joannac> snkcld: $pull is going to give you grief if your arrays get large
[23:25:58] <snkcld> ah, rats... so its best to avoid it? then how would one save an array of data, like favorite_artists, and remove/add, without using $pull?
[23:26:58] <snkcld> joannac, it will give grief as far as performance?
[23:28:06] <snkcld> also, if you look at the third line, does adding "favorite_artists: []" to the findOne ensure that there is a favorite_artists field in what is found?
[23:28:55] <joannac> use $exists if you want to ensure a field exists
[23:29:16] <snkcld> ahhh
[23:29:27] <joannac> Actually, I guess $pull is what you need to do
[23:29:46] <joannac> If you're running a replset, keep in mind the entire array gets written to the oplog on a $pull
[23:30:01] <snkcld> the oplog?
[23:30:27] <joannac> the oplog is how updates get transferred to other members in your replica set
[23:31:36] <joannac> oh, ginhinio left :(
[23:32:53] <snkcld> actually it looks like $exists isnt doing anything for me ;( http://i.imgur.com/qyqyhc9.png
[23:33:29] <snkcld> err
[23:33:32] <snkcld> hold on. lol.
[23:34:37] <snkcld> whoops. wrote the query wrong. ok, cool. thanks