[02:22:49] <tubuliferous> Hey folks, I'm new to databases, and I'm sure of the best database software for my needs. Would you mind offering some advice?
[10:17:18] <Veejay> Hi, I'm trying to restore data using mongorestore and I am getting the following message: assertion: 13053 help failed: { errmsg: "no such cmd: isdbgrid", bad cmd: { isdbgrid: "1", help: 1 }, ok: 0.0 }
[10:18:11] <Veejay> Apparently this error message is returned by mongod because it is only available to mongos
[10:19:03] <Veejay> Since I am not issuing this isdbgrid command myself, I was wondering if it is part of the mongorestore dance and if so, is there anything I can do to restore the data?
[10:22:44] <Veejay> Ah got it, I was specifying the whole replica set in the --host arg
[12:06:08] <traplin> so basically i have data being sent from the client in JSON format. now i want to use one of the variables of that data as the query for the findAndModify
[12:06:26] <traplin> if i use say "61743322", it works fine, and updates that record. but with the data.user_id, it won't update at all
[15:00:23] <traplin> thats the query and when it is called
[15:00:39] <hipsterslapfight> so i can use $pull to remove a given field from an array of an object ... how would i go about removing a field of an object if it matches something
[15:00:49] <hipsterslapfight> basically like $pull for fields not arrays?
[15:01:20] <Nodex> hipsterslapfight : make the query look for what you wnt
[15:01:25] <tiller> I have what is, I think, a tricky question: Is there a way, during an update/upsert to merge some "subdocuments"? For example, I have: db.users.insert({name: "Tiller", projects: [{id: proj1, roles: [role1]}]});
[15:01:46] <Nodex> for example. db.foo.update({foo:'bar'},{$unset:{foo:'bar'}});
[15:01:48] <hipsterslapfight> oh bloody hell Nodex .. i was just typing up that i don't know what i want but of course i do i have the field right here :/
[15:03:10] <tiller> ok, then I think I'll just split my query. Thanks :)
[15:12:12] <theblang> Anyone use mongoDB with Spring?
[15:30:49] <ram_> hi all :D how i can create new object in flask/mongoDB (line 7 : https://gist.github.com/anonymous/8402206) i get this err : AttributeError: 'NoneType' object has no attribute 'amount'
[15:38:39] <ekristen> as I understand it I can use mongos without setting up sharding initially so that I can do that in the future
[15:40:46] <Nodex> i that a question or a statement
[15:41:10] <ekristen> Nodex: yes question, I left off the ?
[15:42:04] <ekristen> so I’m doing testing right now, I have a single mongodb instance with replSet turned on, plus a config server on the same box, on a secondary box, I’ve created a mongos instance and connected to it via mongo
[15:42:21] <ekristen> connections seemed to work and show dbs shows admin, config
[15:42:28] <ekristen> but when I try to create a new collection it fails
[16:52:31] <stymo> Hi, we're considering Mongo but the lack of decimal support seems problematic. I thought I'd ask here if anyone can talk about how they've handled that.
[17:01:31] <luca3m> I used this way to store money data
[17:02:25] <stymo> The integers would have to be very large, and I'm wondering if it's possible we may end up losing precision because we might get to a value too large to represent
[17:02:41] <stymo> Say if we were calculating an average over a year
[17:04:34] <stymo> Has anything like this been an issue for you?
[18:16:44] <slammmm> var databaseUrl = "mydb"; // "username:password@example.com/mydb"
[18:16:44] <slammmm> var followers = ["id", "following"];
[21:20:28] <ghost1> Are any of the core team members here?
[21:25:14] <Derick> ghost1: I write code for MongoDB's PHP driver... all I can offer :-)
[21:25:44] <ghost1> Derick: Hi Thanks, its a bit of topic but I was hoping I could get help. I was curious as to how the team manages system and user documentation? What tool do you guys use? I am working on a project that is turning into a huge project, and I was hoping on getting pointers from a group that is already managing large and complex project.
[21:27:20] <Derick> ghost1: hmm, for the PHP driver we use PHP's system. docbook mostly. I think at MongoDB we use something in github.
[22:13:05] <cortexman> i ran all possible combinations..
[22:13:14] <retran> all possible combinations of what
[22:13:23] <retran> you have to create your indexes for a particular find
[22:13:28] <yho> hiya. i'm using the node.js api. if i have two GridStore objects with the same filename (but different id's) stored at a different time, how would i get the newest one using the constructor? it seems to return the oldest one by default.
[22:13:44] <retran> tell me what find's you want to see how to index
[22:42:57] <Cort> does anybody have any idea how to map/reduce for recursion? i.e. extract trees from a collection of docs that can each point to a parent doc?
[22:44:21] <cheeser> "recursive query" implies joins which mongo doesn't do
[22:44:43] <Cort> i am saying it wrong. i mean extract trees of documents that refer to eachother
[22:44:55] <Cort> which is discussed in the mongo docs
[22:45:10] <Cort> in fact i don't need to extract the tree, only count the number of docs in it
[22:45:59] <Cort> in no way am i confused that mongo is an RDBMS w/ joins
[22:46:03] <Cort> i am referring to: http://docs.mongodb.org/manual/tutorial/model-tree-structures/
[22:48:41] <Cort> can implement in any way that will work for counting the number of docs in the tree
[22:48:49] <Cort> currently have "point to the parent" implemented
[22:49:10] <Cort> a la http://docs.mongodb.org/manual/tutorial/model-tree-structures-with-parent-references/
[22:49:46] <Joeskyyy> If you're doing a lot of updates an array of ancestors may make sense, dependings on what you're doing. Since you can rewrite an entire path in one atomic movement.
[22:50:08] <Joeskyyy> But again, that all depends on what you're doing exactly.
[22:50:29] <Cort> yes array of ancestors and nested sets both help for extraction
[22:50:40] <Cort> but the impact on moving a node is not good
[22:50:51] <Cort> i have multiple actors moving docs in a tree
[22:51:17] <Cort> so assume path x>y>z and x>a>b>c
[22:51:26] <Joeskyyy> True. Although if you kept track of where you're moving it to, the array of ancestors would still provide the best movements in regards to atomicity
[22:52:04] <Cort> well i have to update the ancestors of all the children of the doc being moved
[22:52:11] <Cort> say i have thousands of children
[22:54:13] <Cort> similarly with nested sets, large tree + many concurrent updates is a problem
[22:54:14] <Joeskyyy> Yeah not really sure how to make it faster for you though. With that many operations, you're going to run into something like that at some point.
[22:54:39] <Cort> yes which is why it's an operation that belongs in mongo
[22:55:31] <Cort> thanks for attacking the problem w/ me
[22:59:39] <unholycrab> is it okay to take and use a live snapshot of a drive containing the mongodb data? like an an AWS EBS volume
[22:59:59] <unholycrab> ive been doing that to clone mongodb instances, but it goes into journal recovery when i start the new instance using the snapshot
[23:01:06] <Joeskyyy> I'd do a mongodump, if you're aiming to get a good chunk of data over
[23:02:30] <unholycrab> im aiming to get enough so that i can add it to the replica set and sync up
[23:03:49] <Joeskyyy> Right, a mongodump will acheive that as well
[23:05:21] <Joeskyyy> That way you can get a big chunk of the data over, then all you need to do is sync the diff from when you took the mongodump
[23:06:45] <unholycrab> a low level drive snapshot is way easier, as long as im not risking corrupting data
[23:07:08] <unholycrab> so my question is whether or not that is safe
[23:07:34] <Joeskyyy> I'm not familiar with how EBS takes a snapshot at the infrastructure level. So I don't know tbh.
[23:07:49] <Joeskyyy> Mongodump takes a clean backup of your data an puts it into a file.
[23:22:28] <unholycrab> its a block-level snapshot of the filesystem
[23:23:47] <unholycrab> er, the drive containing the filesystem
[23:25:12] <Joeskyyy> What I mean is, what if you take the snapshot while a write is happening, and hasn't been written to the replset, or something of that nature.
[23:25:20] <Joeskyyy> a mongodump will ensure it's a clean backup.
[23:25:33] <leifw> Cort: maybe multi-document transactional semantics in tokumx could help?
[23:25:34] <Joeskyyy> A snapshot all depends on chance when you pull the trigger.