[00:33:00] <crazydip> is it possible to set cacheSize to < 1 GB? storage.wiredTiger.engineConfig.cacheSizeGB takes int, which means 0.5 errors out.
[01:03:30] <tdelam> Hi guys, I have these 2 models like so: https://gist.github.com/tdelam/00056e783a7e386a2eb3 with this structure, I need to be able to query all products of a certain type. E.g: "Select all products of type 'computers'" - I thought I can do something like > db.inventory.products.find({ 'type.shortCode': 'computers' }) to get products of that type. How can I get all products of a certain type with this structure?
[07:26:02] <jamiel> If my shard key is foo, and I have a { foo: 1} index but also compound index { bar: 1, baz: 1 } ... if I include the shard key in my { bar: 1, baz: 1 } query will both indexes be used or should I be including the shard key in every index where it makes sense (index size is already a problem for us hence trying to cut down)
[07:30:19] <joannac> no, one index per query except for exceptional circumstances
[07:30:46] <joannac> does it make sense to query on foo as well as bar or baz?
[07:33:57] <jamiel> the query works without foo, but won't that help the config servers find the shard?
[07:35:00] <jamiel> I'd expect mongo-config to use foo to find the shard, then the mongod to use foo index initially then intersection with the compound index
[07:37:44] <Boomtime> jamiel, if your data is distributed across shards based on the content of 'foo', how would a query on 'bar' and 'baz' possibly restrict to a particular shard?
[07:38:32] <Boomtime> if you can construct a query which includes the shard key as a predicate then the routers are able to direct the query to the applicable shards
[07:40:05] <jamiel> foo and bar are one to many so it will restrict in most cases unless it's been chunked
[07:40:41] <Boomtime> is only foo is in the shard key?
[07:41:05] <Boomtime> if foo is the only field in the shard key, it is the only predicate that can affect query routing
[07:42:01] <jamiel> Indeed, which is why I'd like to include it in the query but then I need to add it to practically every index
[07:45:13] <jamiel> seems like an awful waste it's a 5GB index by itself and across 4 collections with multiple indexes and similar structure that change we're talking about an extra 35-50GB of indexes = RAM :(
[07:45:14] <Boomtime> jamiel, are you saying that your queries today _could_ be including the shard key but aren't?
[07:47:42] <jamiel> it's not needed apart for routing in most of the queries and is just extra scan and extra space, but at the point where need to start thinking about routing speed
[07:48:58] <jamiel> Was hoping multiple indexes could just be used ... one foo index to satisfy the routing and lookup for all queries and then the compound indexes get used through intersection .. but sounds like that's not how it works and I need foo in every index now?
[07:49:12] <Boomtime> ok, so when it comes to routing queries, the mongos and the shards are independent
[07:49:27] <Boomtime> that is, the mongos routes based on the shard key information it has
[07:49:47] <Boomtime> but the shards determine for their own self what index will be used to satisfy the query as they have received it
[07:50:22] <Boomtime> i.e there is nothing to stop you from adding the shard key predicate to your queries then simply watching what happens
[07:50:51] <Boomtime> the mongos will route better because it will observe routing information given via the shard key predicate
[07:51:11] <Boomtime> the shards however will now have 2 competing indexes to race occasionally when planning the resolution of such a query
[07:51:50] <jamiel> So I could append the shard key to queries simply for routing purposes? :) If I prepend it on current setup explain() tells me that my foo index is being used not my compound index
[07:52:12] <Boomtime> because it isn't a compound index
[07:53:16] <Boomtime> wait.. you say the shards changed to using the shard index rather than your bar/baz index?
[07:54:44] <Boomtime> i would be interested in seeing the output of explain(true)
[08:12:04] <jamiel> Boomtime, took a while for it to finish, but results are SINGLE_SHARD query winning plan my compound index ... but it was incredibly slow presumably because it had to do a full document scan on foo without an index after it had looked up bar,baz?
[08:13:09] <jamiel> I can see totalKeysExamined === totalDocsExamined
[09:01:36] <ksmtk> I've setup mongo on ubuntu server, added admin and regular user
[09:01:43] <Progz> Hi, I have got some issue with my replica server. I have 3 mongo server in replication. 1 Primary, 2 Secondary, everybody can vote. I have got 3000 websites requesting in to this mongo replica. I don't know why some request taking a long time.
[09:01:47] <Progz> See here : http://pastebin.com/m25eni9N
[09:02:20] <Progz> The 3 servers mongo got the same hardware. 2 CPU et 15 GB ram. Index size = 2,8 Gb. Engine : WiredTiger
[09:02:32] <ksmtk> and successfully connect via mongo shell like mongo <IP>/admin -u <username> -p<password>
[09:02:39] <joannac> fontanon: that sounds like you have a bad shardkey
[09:02:45] <ksmtk> but connecting via robomongo fails
[09:09:26] <Progz> joannac, yeah when I restart the mongo server, it is very fast. But when I start apache and all the front website requesting in to mongo. Load average on the mongo server are increasing and request taking more and more time.
[09:11:18] <ksmtk> btw what is the last version of mongo is supported in Robomongo?
[09:11:45] <Progz> one hte official website : Note: We are working on an update with MongoDB 3.0 compatibility for the upcoming Robomongo 0.9.x release series.
[09:20:11] <ksmtk> I've created a question http://stackoverflow.com/questions/31805302/mongodb-authorized-connection-works-on-mac-shell-but-fails-in-macs-robomongo
[09:20:25] <ksmtk> maybe someone have something to suggest
[10:34:03] <amz3> héllo, I'm using wiredtiger library, is it ok to ask questions about it in this channel?
[10:35:52] <Derick> library? or storage engine for MongoDB?
[10:36:38] <amz3> wiredtiger the storage engine of mongodb, but since it's mongodb database, I wondering if this channel provides some kind of support for it
[10:38:17] <amz3> I'm (re) building a ffi bindings of wiredtiger in guile. The bindings were working correctly until I moved to ffi bindings. the ffi bindings works great if I do not use transactions. If I use transaction, cursor->set-key returns an error 200
[10:39:07] <amz3> sorry the error is 192 if I don't provide an isolation level
[10:40:19] <amz3> the error is 192 for isolation level in (read-uncommited, read-uncommited, empty) but 200 if I use "snapshot"
[10:41:09] <amz3> ffi bindings is kind of detail, my question is about those error codes, I can figure where they are from. I grepped the source, but can't find them
[10:53:26] <amz3> session->strerror says the error is unknown
[10:53:47] <amz3> well, this is probably a problem with my code, I though someone could help me with the error
[12:33:18] <amz3> I found my error. I was checking for the return code of cursor->set_key(item) except it doesn't return an error code; it has void as return signature
[12:34:31] <amz3> and it's correctly explained in set_key documentation
[13:10:39] <amz3> the code of the graphdb in scheme can be found @ https://git.framasoft.org/snippets/51
[13:10:56] <amz3> well bindings are also on the same website but it might not be what interst you
[13:13:40] <amz3> well, to add more background to project and maybe help(?) mongodb, my interest is to have a very easy (like sqlite) to setup database, but with the power of graphdb/mongodb
[13:14:11] <amz3> my understand is that mongodb is for big projects, whereas my interest is in "small scale" development
[13:19:54] <kfirfer> Hello, someone here assign to the course java mongodb in mongodb website?
[14:27:25] <devastor> Hi all, does anyone know if there was some big changes to index building in 2.6? a resync with 2.4 previously took about 2 weeks (mainly building a big index of an array field), but with 2.6 it apparantly completed successfully in about 2 days. Is that expected?
[17:42:45] <crazydip> Can someone point me to the reasoning why MongoDB requires gcc >= 4.8.2 and not 4.8.1 or just 4.8? What's so special about 4.8.2?
[17:43:33] <crazydip> or was this just arbitrarily chosen because that's what compilation was tested on?
[18:21:31] <jayjo> Does anyone have a good resource to stream server-sent events to a mongodb?
[18:49:48] <morenoh149> what can I run to recover an unclean mongo shutdown?
[18:50:10] <morenoh149> crazydip: who knows. just upgrade
[18:51:16] <crazydip> morenoh149: Not the reason I ask... I'm building packages.
[20:07:17] <TU> Is there any difference between a mongo index created like {a: 1, b: 1} bs {b:1, a: 1}? I'm trying to create a compound index over two fields and i want to ensure that the more unique field is used for the first layer of looking through the index (essentially trying to create a multi-column sql index where you can control the order of the columns in the
[20:53:48] <Derick> it's a handle on the driver side, that a driver can use to fetch subsequent results from the server
[20:54:22] <StephenLynx> it enables you fetching results in parts instead of getting all results at once from a query
[20:54:32] <StephenLynx> imagine having to hold a million documents at once.
[21:13:30] <topwobble> Does anyone know how to make a custom Mongoose transform on incoming data? I'd like to add a field called __length that indicated the length of the JSON received over the network
[21:14:05] <topwobble> I'd like to specify my own toObject() method so I can add on the __length field when I parse the json into an object
[21:26:42] <n_i_c_k> Derick: i need to find a shortest path from nodes.. ie A B 10, B C 50, C D 43, C E 32 etc... then i must calculate whats the lowest value from A to E
[21:26:51] <n_i_c_k> i thought solving it using map reduce
[21:26:59] <n_i_c_k> do you think its a proper tool ?
[21:29:56] <jpfarias> I just found out that doing queries with $all is pretty slow and that is even noted in the documentation, what would be a faster alternative to an $all query?
[21:33:35] <Derick> n_i_c_k: sounds like you'd want a graph database?
[21:34:33] <n_i_c_k> Derick: hmmmmm maybe... im not sure.. why do you think that would be better ?
[21:39:09] <cheeser> neo4j is probably the most popular graph db out there.
[21:43:23] <devastor> Hi all, does anyone know if there was some big changes to index building in 2.6? a resync with 2.4 previously took about 2 weeks (mainly building a big index of an array field), but with 2.6 it apparantly completed successfully in about 2 days. Is that expected?
[21:54:46] <EllisTAA> can someone tell me the difference btwn these two lines? https://gist.github.com/ellismarte/5f53c06cc13b9b87b6b1
[22:12:39] <blizzow> My mongod instances of my sharded cluster sometimes experience hangtime. When I try: mongo localhost/admin -u myuser -p mypassword it will connect but then take a long while for the mongo> prompt to show up. I don't see any errors in my logs, and the slow connections don't seem to correlate to any database activity, I don't see I/O wait, or heavy CPU spikes during these brownouts either. How can I figure out what the issue is on these intermittent slow c
[22:13:21] <blizzow> I'm running mongo 3.0.5 on ubuntu 14.04.2 with all the latest and greatest patches installed.
[23:19:36] <leptone> how do i know if my mongoldb database is running?
[23:30:21] <EllisTAA> i set up my schema in my mean stack app, but where do i define the db?
[23:34:27] <EllisTAA> can someone tell me what is going on in this line? it is requiring models/models.js but what is models.js returning? https://github.com/hwz/chirp/blob/master/chirp/app.js#L10
[23:53:44] <leptone> so the command mongod tells you system which MongoDB server to connect to?