PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Friday the 12th of December, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:09:24] <tjmehta> Hi all, quick question: If create a compound index like { foo:1, bar:1 }. Will that also create an index for {foo:1}, so I don't have to index that field outright?
[00:11:40] <joannac> no, but searching on foo will be able to make use of that index
[00:11:50] <joannac> so you don't need a separate {foo:1} index
[00:12:33] <cheeser> but you will need one to query against just bar
[00:29:15] <tjmehta> thanks joannac
[00:53:58] <tjmehta> joanac, another indexing question for you: http://www.codeshare.io/NMKzU
[00:54:50] <tjmehta> Are indexes used for $elemMatch queries? In the link I send you you can see I am find a project by id and then using an $elemMatch to find a particular file.
[00:56:24] <joannac> that's not correct syntax
[00:57:23] <tjmehta> joannac are you sure? $elemMatch is different and is used in fields as far as I knew?
[01:02:01] <tjmehta> oh nvm
[01:02:06] <tjmehta> maybe only with mongoose
[01:02:30] <tjmehta> http://runnable.com/U-LIUOp2dSJ3WbZF/mongooose-%24elemmatch-example-for-mongoose-node-js-and-mongodb
[01:34:10] <epx998> Is there a decent howto guide for upgrading from 2.2 to 2.6?
[01:49:35] <engirth> suppose you have a document that has a changes [] that you push into changes for a given day. I'd like to get the array index for $push since I want to maintain a reverse lookup.
[01:54:53] <dpg2> will mongo ever delete a record on update?
[01:57:35] <dpg2> nevermind. it just... replaced everything.
[02:01:23] <dpg2> don't do this: @mongo.update({"object.id" => object.id}, {"object" => { "name" => new_name, "path" => new_path } })
[02:06:13] <dpg2> ah, I RTFM and now I understand.
[02:06:17] <dpg2> thanks. :)
[03:47:00] <blizzow> I want to create a query for all documents in a collection inserted after ObjectId("l38463358349slj2398r"). Anyone can someone here explain how I'd do that?
[04:12:25] <lacrymology> is there a way to not insert duplicate objects, when not passing an _id? I mean, besides doing a find for each object I want to insert
[04:15:49] <x0f> lacrymology, do you need to update this document? otherwise add an index with a unique-key, which raises an error upon insertion
[04:16:18] <lacrymology> x0f: what if I'm inserting a list of objects and one fails?
[04:17:07] <lacrymology> I mean, will the whole insert fail, just the one object, or from that object on in the sequence?
[04:18:39] <x0f> depends on your method of insertion, i guess. afaik transactions are atomic so the single insert for this document will fail, how your driver handles it depends if you need to rerun ist, or whatevers.
[04:26:11] <kataracha> is there a recommended production setup for connecting to mongodb server on a local network? ie should I stay listening on local interfaces and create an ssh tunnel or listen to external interfaces directly and give my connecter the private ip etc.
[08:32:40] <hari_> Hi Guys
[08:32:48] <hari_> I am new to mongdb
[08:33:08] <hari_> I just want to run my mongodb server in embedded mode
[08:33:39] <hari_> Does mongodb allow me to run my mongodb server in embedded mode?
[08:33:42] <kali> nope
[08:33:50] <hari_> thnaks
[08:34:01] <hari_> thanks*
[08:40:06] <kataracha> are there any freely available maintained mongo with ssl packages somewhere?
[08:41:29] <hari_> Do we have any work around to fix the embedded database problem for an application?
[08:42:20] <kali> hari_: what's your environment ?
[08:46:16] <hari_> I am having a java application which communicates with mongodb
[08:46:33] <hari_> My application is deployed on tomcat
[08:47:06] <hari_> I want to package my application in such a way that client need not install mongodb
[08:48:30] <kali> well, there is this: https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo
[08:49:30] <kali> but... i'm not too sure this is a good idea
[08:50:29] <hari_> I have one question?
[08:50:41] <hari_> If the application is shutdown
[08:51:01] <kali> well, that's part of the problem :)
[08:51:05] <hari_> And if it restarts will my data in mongodb persists?
[08:51:13] <kali> a database have to be managed
[08:51:16] <kali> backup
[08:51:18] <kali> monitored
[08:52:03] <kali> unless it is a session store, i recommend you don't embbed the database
[08:53:14] <hari_> ok
[08:53:32] <hari_> thank you
[10:50:52] <kenalex> hello everyone
[13:16:46] <inad922> Hi
[13:16:54] <inad922> How do oyu guys usually create a database diagram for a mongo database
[13:16:56] <inad922> ?
[13:29:21] <kali> inad922: i prefer to make example documents
[13:30:02] <inad922> kali: Yeah, that can be good solution too
[13:30:14] <inad922> I try to create an ERD with draw.io
[13:31:58] <kali> inad922: yeah, i'm not a big fan
[13:32:11] <kali> of ERD
[13:32:31] <kali> i prefer uml
[13:32:34] <kali> (kidding)
[13:34:37] <inad922> :)
[15:38:33] <chiku> Node Mongo dB inserts fail siently
[16:41:12] <kataracha> has anyone had experience building and mainting mongo themselves here? was there significantly more overhead compared to using a package?
[16:48:14] <kali> kataracha: the build take ages
[16:48:22] <kali> apart from that...
[16:49:02] <kataracha> what about patches etc or is it mostly self sufficient for a long enough period
[16:50:54] <kali> we were re-building at each new release
[16:50:54] <kataracha> mostly I was interested in using --ssl is all and either I would have to build mongo or use something external like a ssh tunnel or stunnel and am wondering the best route re overhead/performance
[16:51:31] <kali> tunnels will probably not work with anything more complex than a standalone server
[17:19:46] <kataracha> kali: what about setting up the mongod service to run with the recommended ulimit values and upstart scripts etc
[17:20:06] <kataracha> was there much peripheral setup after the build
[17:21:55] <kataracha> or if I already have the 2.6 package install can I mostly just build mongo how i wish and drop in the binary
[17:22:50] <kali> kataracha: just make sure you set the package on hold
[17:22:59] <kali> kataracha: another option is to rebuild the package
[17:29:02] <kataracha> I dont understand why ssl isnt just build into the packages to begin with is there a reason other than adding value to the enterprise service
[17:29:52] <kali> kataracha: i don't know for sure, but it might be the paranoid american exportation laws
[17:30:17] <kali> (and... I've just been flagged by the NSA)
[17:30:37] <kataracha> :D
[17:49:50] <dpg> anyone know why I might not be able to update/set a record again after I've done it once?
[17:50:01] <ekristen> question, my mongodb replicaset has reached about 7tb, and I’m starting to delete old data,
[17:50:15] <ekristen> I want to get down under 4tb of usage, will i be able to regain any diskspace?
[17:50:34] <cheeser> depends on how you delete.
[17:50:49] <cheeser> a remove() won't free up space, a collection drop() will
[17:52:20] <kali> cheeser: a collection ? or a database ?
[17:54:05] <cheeser> collection, iirc
[17:54:12] <cheeser> but i could be mistaken
[17:54:37] <cheeser> given that most data paring is usually a remove({...}) it probably doesn't matter either way
[17:54:49] <kali> yeah
[18:09:08] <ct_> Hi, I need some help on a strange issue that happened on my 3 replicaset.
[19:32:16] <chiklu> Can some one please help me with this one
[19:32:19] <chiklu> http://stackoverflow.com/questions/27439077/node-mongo-inserts-start-to-fail-silently-after-a-few-minutes
[20:05:50] <dpg> any reason I can only update a record once? subsequent updates have no effect.
[20:25:43] <cheeser> a bug in your app
[20:39:08] <mod^> wotcher
[21:04:28] <elux> hello
[21:04:48] <elux> id like to upgrade a mongodb 2.6.4 cluster to 2.6.6 .. can i take down a replica, upgrade it, then put it back up, and keep going..?
[21:04:59] <elux> or do i need to take them all down, upgrade all to 2.6.6 and then all bakc up?
[21:06:07] <cheeser> you can do a rolling upgrade, yes.
[21:06:35] <elux> thanks
[22:01:21] <felipesabino> can anybody help how to setup some databases with replica set enabled using docker (and may be fig)? http://stackoverflow.com/questions/27449306/what-is-the-proper-way-of-setting-a-mongodb-replica-set-using-docker-and-fig
[23:19:34] <ct_> hello!