PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Wednesday the 2nd of January, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:14:54] <nicksloan> I'm wondering how people have stored weekly event data in mongo. I need to store a schedule or weekly, recurring events. like every Tuesday and Thursday at 2pm.
[01:02:59] <dingo2> nicksloan: just same as u would in any code
[03:53:55] <Shadow_S> if my database schema is a very large one. let's say "cout" is an attribute of "function" which is an attribute of "language", would finding "cout" be slower than if it was in it's own datastructure?
[04:50:06] <sagarchalise> hi guys, is there a way to copy collections from one db to another within mongodb and keep them synced
[05:26:50] <sagarchalise> hi is there way within mongodb to keep two databases synced with each other
[05:27:34] <ron> hmm, why do you need that?
[05:28:24] <dingo2> sagarchalise: not exactly unless u are willing to compromise on data
[05:29:53] <sagarchalise> well basically it would be one way sync, dingo2
[05:31:13] <dingo2> sagarchalise: if u use mongoexport/import u can't transfer some of the internal bson formatted fields
[05:31:46] <dingo2> sagarchalise: so if u want to do it like that.. u have to not use those type of fields
[05:32:27] <dingo2> or accept the std ways that they transfer
[05:34:10] <dingo2> sagarchalise: why not just learn how to use replication?
[05:36:19] <sagarchalise> dingo2, I am looking into it as well
[05:40:07] <dingo2> good luck :)
[05:43:51] <shaz> Hey - I was hoping someone could point me in the right direction on using an $elemMatch in a projection on the mongo-ruby-driver; the db['collection'].find() only seems to like ":fields => ['a','b']" as the second var
[09:27:45] <Guest_1448> in mongo, if I do collection.remove({x:y}); collection.insert([...]) - is the insert guaranteed to run after the remove call?
[09:32:28] <NodeX> if you use safe mode yes
[09:32:46] <NodeX> safe mode / write concern (on by default in the latest releases)
[09:40:41] <Guest_1448> thanks
[09:40:59] <Guest_1448> but not without safe mode?
[09:41:26] <Guest_1448> insert can run in parallel with remove if I don't use safe mode?
[09:43:47] <NodeX> mongo is fire and forget
[09:45:36] <Guest_1448> yeah but isn't there a queue on server to make sure the commands issued run in order?
[09:46:50] <ron> doubtful. afaik, mongo isn't single-threaded (unlike Redis, for example).
[09:47:04] <kali> mmm write are single threaded
[09:47:22] <kali> i don't think the server can reorder ops
[09:47:26] <ron> and if you have a sharded database? ;)
[09:47:29] <kali> even in "unsafe" mode
[09:47:40] <kali> ron: yeah, there's that.
[09:47:53] <ron> kali: does that mean I win?!
[09:48:01] <kali> well, no.
[09:48:17] <ron> damn.
[09:48:21] <kali> because the queue of each shard is not reorderable
[09:48:51] <kali> and if the insert and remove happens on two different shards, i guess it does not matter in which order they happen
[09:49:29] <ron> in that case, why is there a global lock on the database?
[09:49:30] <pietia> : is it possible to use gridfs documents as as embedded documents (in some other document…) ?
[09:49:50] <kali> ron: there is no such think in sharded mode
[09:49:52] <NodeX> pietia :only by storing the id and gathering it in your script
[09:49:53] <kali> thing
[09:50:03] <kali> the lock is per shard
[09:50:15] <NodeX> bottom line is, if you wait for a write response then it's effectvily a que
[09:50:17] <NodeX> queue *
[09:50:20] <ron> of course, but even in a single shard.
[09:51:08] <pietia> NodeX: ok. what's common approach to this? storing the id in fs.files.metadata or on some other document's side?
[09:51:29] <NodeX> that's what I do
[09:52:01] <pietia> NodeX: in fs.files.metadata?
[09:53:08] <NodeX> yes
[09:53:17] <pietia> k
[12:09:55] <xcat> I have a property collection like {foo: {'0': { baz: 'bat' } }, {'1': { baz: 'bar' } }, {'2': { another: 'document' } } } How do I find foo documents which have a baz property?
[12:10:31] <ron> umm.. is that supposed to be a map?
[12:13:46] <xcat> It was supposed to be an array but PHP saved it with numbered indexes
[12:18:49] <ron> NodeX: ^^
[12:30:19] <NodeX> err
[12:30:47] <NodeX> those numbers are strings so your code saved it like that
[12:31:13] <NodeX> the best thing to do is to fix that and then it will be better for querying
[13:34:32] <oskie> hello
[13:34:40] <Zelest> hi
[13:34:42] <oskie> isn't stable 2.2.2?
[13:35:16] <Zelest> that is correct, probably just an outdated topic.
[13:35:38] <oskie> outdated since 2012-11-27
[13:36:53] <oskie> i have io performance issues with mongodb on EC2, and i need to figure out a way to test performance outside the cluster somehow
[13:37:35] <oskie> i looked at mongoperf but it doesn't give much comparable (there's no total "average" or anything like that)
[13:51:07] <irakli> does anyone know why I can't use $where or geospatial operations in $match queries as part of the aggregation pipeline?
[13:57:15] <NodeX> irakli : the AF doesn't support geospatial at present
[14:56:03] <scoutz> hi
[14:57:14] <scoutz> i'm trying to setup replication and was wondering: I setup replication on mongod on my localhost1 and have a replica set on localhost2, for failover to work i should connect to a mongos right?
[15:10:04] <oskie> scoutz: no need for mongos. but you will need a third member (e.g. arbiter) for failover.
[15:52:13] <aline> How can I get for a simple dataset {ID:'A', val: 1 ; ID:'B', val: 2 ; ID:'C', val:1} all ID's that match a single criterion val = 1 ?
[15:55:12] <ron> that's no a valid JSON no matter how you look at it.
[15:55:15] <NodeX> ID:1
[15:55:17] <ron> not even.
[15:56:04] <bean> it'd be more like {"A": 1, "B": 2, "C": 1}
[15:56:08] <bean> one would think
[15:57:21] <NodeX> or .. [{ 'ID':1, 'val' : 1},{'ID','val':2}]
[15:57:30] <NodeX> or .. [{ 'ID':1, 'val' : 1},{'ID':2,'val':2}]
[16:00:04] <aline> yes ok sorry, and I need the data distinct but I think I got it
[16:10:53] <kali> bean: your proposal looks nice, but will not work for aline's query. usually the NodeX is the way to go: keys in mongodb are keywords, not data
[16:11:28] <aline> I got it and asked to soon, thank you
[16:18:39] <bean> kali: you're right, hadn't had my 2nd cup of coffee yet
[17:20:50] <ismell> ello
[17:21:04] <ismell> how can i cancel a db.repairDatabase()
[17:21:12] <NodeX> kill the server
[17:56:18] <zastern> is rs.conf() meant to list the priority of each member of a replica set? I've tried changing priority as per this documentation - http://docs.mongodb.org/manual/administration/replica-sets/#replica-set-node-priority - but I can't find any way to check if it worked.
[17:59:53] <zastern> hmm, it's working now, i must have done something wrong
[19:06:51] <zastern> Can I have say, mongo 2.2.1 in a replica set with 2.2.2?
[19:15:03] <NodeX> http://www.telegraph.co.uk/technology/news/9773058/Apple-products-top-list-of-unwanted-Christmas-gifts-as-parents-get-i-confusion.html
[19:15:04] <NodeX> LOL
[19:18:29] <kali> :)
[19:22:58] <rekibnikufesin> it's off to the iSland of misfit toys for Apple...
[19:23:30] <NodeX> I hate Apple with a passion
[19:23:50] <NodeX> for some reason I feel intense anger toward them as a company, not sure why
[19:23:52] <kali> i hate them, but i like their products
[19:24:15] <kali> well, some products.
[19:25:16] <MacWinner> Hi, I'm trying to make a decision about using MongoDB.. Is it a good usecase for using it as a User store? I'm coming from a MySQL background.. i'm an old dog tyring to learn new tricks
[19:26:06] <NodeX> I use it as a user store]
[19:26:23] <NodeX> mine is probably different from yours though
[19:27:30] <TkTech> Sorry, do you mean for accounts or an e-commerce store?
[19:27:57] <MacWinner> accounts.. basically a have a simple facebook app.. just wanted to store my users and some friends relations
[19:28:13] <MacWinner> eventually will have some transactions..
[19:28:19] <kali> relations n to n can be tricky
[19:28:22] <kali> transaction too
[19:29:08] <MacWinner> got, thanks!
[19:29:28] <kali> i scared him away :/
[19:29:42] <MacWinner> nope.. I think I have a better understanding of where it's used now
[19:30:19] <MacWinner> I can use it for storing comments and events for the users.. but that actually user store and relations between users, I'll leave in mysql
[19:30:31] <kali> MacWinner: i use it as a general purpose DB, replacing SQL, but i have to deal by hand with the few scenario where i need multi-docs "transactions"
[19:31:01] <NodeX> +1
[19:31:17] <kali> but i would not implement a store (as in the one with a cart) with it
[19:59:00] <Thomas___> I'm having some problems with a normal $push. I've done $push-es before but this one is acting up, perhaps I'm forgetting something. db.orders.update( { id: "153641332" }, { $push: { "meta": "cat" } } );
[20:04:56] <Thomas___> This document is being really stubborn for some reason.
[20:05:24] <kali> Thomas___: show us the doc
[20:05:35] <kali> i bet the id is an integer
[20:07:12] <Thomas___> yep
[20:07:36] <Thomas___> thanks kali
[22:46:08] <lordblackfox> i have begun to play with mongodb in c++; I was wondering why you're not using standard containers and having so much classes to work with binary tree of objects
[22:47:17] <lordblackfox> I have made something like that some times ago, for a JSON parser; I had something a lot simplest
[22:47:19] <lordblackfox> https://github.com/lordblackfox/nanom/blob/master/modules/propertytree.hpp
[23:25:08] <leitz> Anyone familar with the 10Gen mongodb server package init script? I tried to start mongod after a clean install and the script doesn't return to the command line.
[23:27:05] <leitz> Well, okay, so tried it again and it returned a failure. Log reading time.
[23:28:21] <w5pm> hey guys, i need to write a server to handle payments? is mongodb a good choice for tracking user purchases or should I go with a more traditional sql solution?