[00:19:01] <jtomasrl> what are the pro/con of these two approaches? https://gist.github.com/daa38f4475e7ad96774b
[00:48:42] <markfinger> Using Mongo 2.0.6 we've hit an issue where some of our test data is silently failing to be imported prior to the execution of our test suite. As an example of the data which works and fails: https://gist.github.com/983751cd6dab480f7043
[00:51:01] <markfinger> So one json file has all but one of it's records imported successfully, the one fail seems to happen silently and it never turns up in the collection. The test data itself was dumped to json after a successful import from a bson dump
[00:51:20] <markfinger> Are there any common causes for something like this to occur?
[02:28:44] <jtomasrl> is it possible to check if the attribute exists before using a select to get it?
[02:56:49] <nopcode> Mon Oct 22 04:47:50 [conn1] aborting
[02:56:52] <nopcode> mem info: vsize: 1627 resident: 800 mapped: 976
[02:57:47] <nopcode> this is version 2.0.7 i believe
[02:59:18] <nopcode> this happens while inserting items
[03:00:52] <fonrithirong> hi, i'm getting a "Object reference not set to an instance of an object." when i do insertbatch (c#) with thread. when i do it without thread, everything is fine. can someone help me? thank you
[03:11:46] <nopcode> oh it seems its an openvz issue...
[04:04:28] <fonrithirong> now i'm getting "MongoDB.Driver.MongoConnectionException: Unable to connect to a member of the replica set matching the read preference Primary " but replication set isn't running
[04:24:12] <fonrithirong> ok, it dissapears when i remove all connectionstring host and only give it one host
[04:31:22] <chovy> looking for some advice. I have a user, which can create a list, and then add items to that list.
[04:33:04] <chovy> I want however, to expose all items created as an option to other users. They can either use an existing item and add to their list, or create a new one. The trouble I'm having how to best display this option to the user. And if a user should be able to edit an item someone else created.
[07:13:23] <samurai2> hi there, how do I put the result of mongodump --out into /folder that on another ubuntu machine? thanks :)
[07:14:13] <samurai2> I mean the result of mongodump command generated in another ubuntu machine folder. thanks :)
[11:47:00] <dob_> okay, thank u. Store it now as String/enum. Stored it as Boolean in a earlier project as I did in mysql, but the question is always if men or women should be zero ;-)
[11:50:09] <ron> it's all about verbosity. I just prefer that if someone looks at the database, that they can read and understand the info there. no need to be cryptic.
[11:50:22] <ron> plus we have the option for unspecified.
[12:33:50] <jasiek> does map/reduce actually do anything in parallel?
[12:57:48] <remonvv> get the best of both worlds and store as "M" or "F"
[12:57:55] <remonvv> 7 bytes storage and still human readable
[12:58:10] <NodeX> is a lowercase "m" smaller than an uppercase?
[13:43:48] <Zelest> shame it's not ported to FreeBSD yet. .:/
[13:43:54] <Zelest> or well, it's not in ports yet at least
[13:44:17] <Zelest> is it compiled the same way so one can just bumb the version number, or does it require more hacking than that?
[13:50:11] <emilsedgh> im using mongodb in a project, my first experience. somehow, i've got a feeling that im still having 'relational way of thinking'. for example, i've got a few models, like for example Artist and Track and Album. Here's an example Album of mine:
[13:51:13] <emilsedgh> as you can see, i keep the relational data in a relational way: i keep the id's instead of objects. am i doing it allright?
[13:51:49] <kali> emilsedgh: it depends how your application will access the data
[13:52:49] <kali> emilsedgh: with this schema, a "natural" page with a list of track names and the author name will have to perform about a dozen lookups to the database
[13:52:59] <emilsedgh> well, my application is a node-based single page application. i've written models which are usable on both client and server with a single api. my models are called like this: album.getTracks(function(tracks){})
[13:53:21] <emilsedgh> kali: exactly. i always have to make multiple queries around to get data.
[13:54:03] <emilsedgh> thats why i've also written a populateAssociations(callback) which loads all associations of a model to help me so i wont get into nested callbacks.
[13:54:39] <kali> emilsedgh: yep, but it does not change the model. you still have to look at a dozen of document to get the information for this page
[13:55:15] <emilsedgh> that is right kali. should i instead whole objects?
[13:55:22] <emilsedgh> if yes, how should i keep them updated?
[13:56:02] <emilsedgh> should i instead *store* whole objects?
[13:56:15] <kali> emilsedgh: if you emmbed more information, you'll make the read easier, and the write more difficult. but in such an app, track names and author names change rarely, so it might be worth paying for expensive updates
[13:57:04] <kali> emilsedgh: most of us use asynchronous loop for dealing with cascading writes in that kind of cases, but you have to code it$
[13:57:41] <kali> emilsedgh: and keep in mind that unless you're re-developping amazon store, it's likely the naive approach will work find for quite a long time
[13:58:30] <emilsedgh> well, i dont expect significant traffic at all. mostly im interested in doing it the right way.
[13:58:51] <kali> this sounds nearly religious to me :)
[14:01:24] <emilsedgh> now, here's another thing. i've got this model name Invoice: http://paste.kde.org/577670/
[14:01:55] <emilsedgh> i need to be able to write an interface which gets a date range and shows a report of sales for albums/tracks in that range.
[14:02:45] <kali> emilsedgh: you need an index on Invoice.date
[14:02:55] <kali> emilsedgh: and the aggregation framework may help you
[14:03:13] <emilsedgh> i've written a map/reduce based code to make that query. but since its a bit 'dynamic', i have to run that code everytime the page is requested.
[14:03:34] <kali> aggregation framework will be way faster than m/r
[14:03:39] <emilsedgh> but i've had the feeling that map/reduce based queries are not something you do regulary or dynamically, but something you do as nightly jobs.
[14:14:05] <Zelest> NodeX, ah, my idea was to use some of the built-in cache features in nginx..
[14:14:39] <Zelest> as for the store i plan to build, it will probably get very little traffic.. but it's built as a "webshop solution" where I easily will be able to add more shops.. so in time, i might get tnos of stores
[14:15:18] <Zelest> the reason i want gridfs for it, is scalability in the sense I can easily add another node (being, a mongodb node, php and nginx) ..
[14:15:19] <NodeX> Nginx will cache MRU and so will Mongo
[14:15:29] <NodeX> also Nginx has a gridfs module iirc
[14:15:32] <Zelest> ans availability, seeing the autofailover in mongo is lovely.
[14:23:00] <Zelest> so, with those numbers (and that hardware and all of course) it's 1k requests per second.. per nginx/mongodb node
[14:23:07] <Zelest> that will last for years for me.
[14:23:51] <IAD> Zelest: and all this operations in benchmark were from cache ...
[14:24:05] <emilsedgh> kali: thanks for helping me out dude :)
[14:39:33] <tomreyn> hi, i've got a rplicaset consisting of two nodes where both nodes think they are secondsary. one of them has correct data, the other has no data. only the one with correct data is running. how can i put them back together? whenever i try to run any commands to split them up or rejoin them i'm told these commands need to be run on the primary, but i currently have no primary.
[14:39:45] <tomreyn> so how can i get the running node back into primary state?
[15:36:53] <mulinux> i need a fast and scalable database engine for a dictionary with approximately 1000 000 entries and a lot of searching in it … is mongodb suitable for it?
[15:59:34] <matubaum> I have a set of documents wich contain an array. I want to query all items containing all intems of an array. Example: http://pastebin.com/8L9m7k0U
[16:00:58] <matubaum> is there an easy way to do this?
[16:07:23] <NodeX> SOLR / ES = better than sphinx (more feature rich and less buggy) fwiw
[16:08:34] <NodeX> tbh ES is a little green and buggy too
[16:09:00] <tomreyn> i've got another question. this two node replicaset have gone out of synch when soeme database operations were run on it. the last message before it reported being out of synch was "cursorid not found local.oplog.rs"
[16:09:12] <tomreyn> how can i prevent it going out of synch again?
[16:09:27] <tomreyn> could this be related to the NUMA issues?
[16:09:59] <kali> tomreyn: check if the replication log is big enough
[16:10:12] <tomreyn> kali: how much is big enough?
[16:10:49] <kali> tomreyn: well, if the lag between the two servers can get bigger than the replication log, your replication is dead
[16:11:12] <kali> tomreyn: and i don't know what numa is :)
[16:11:32] <kali> tomreyn: for the replication log, here, we try to have a few days worth of it
[16:13:02] <kali> tomreyn: depending on your rights rate, it may or may not be possible for you
[16:13:46] <tomreyn> re NUMA, this is a CPU feature. i'm referring to this message which is writtne to logs with the 10gen builds for Fedora 8/Centos 6:
[16:13:50] <tomreyn> Tue Sep 25 18:45:12 [initandlisten] ** WARNING: You are running on a NUMA machine.
[16:13:50] <tomreyn> Tue Sep 25 18:45:12 [initandlisten] ** We suggest launching mongod like this to avoid performance problems:
[18:19:30] <heaven_> was looking forward to the classes but i guess later now
[18:21:39] <iamchrisf> Well if they can't handle an AZ failure in EC2 you might want to start looking at Riak or cassandra :)
[18:22:47] <WarDekar> hey so i had a question about mongo- I'm using pymongo, but this should apply to mongo as a whole as well: I have a new dictionary object that I want to *update* a mongodb object with, but the .update operator will replace the current object with the new one, and the $append will only work with lists, what I want to accomplish is pass a new object in, and if the elements are a list, it'll append, and if it's not a list it'll replac
[18:40:36] <WarDekar> NodeX: But what ends up happening in that case, it makes 'c' an array as well, and also if I pass in {'a': 4, 'b': 3} it throws an error because 'a' isn't a set, I just want it to replace 'a' in that case
[18:40:59] <WarDekar> i understand if these things aren't possible without writing custom code but that's the functionality i'm hoping for so trying to find out if it's possible first
[18:42:05] <NodeX> I see where you might have the problem
[18:42:07] <NodeX> "Adds value to the array only if its not in the array already, if field is an existing array, otherwise sets field to the array value if field is not present. If field is present but is not an array, an error condition is raised."
[18:42:30] <NodeX> "not an array", you didn't sepcify yours was not an array
[18:43:42] <WarDekar> but addToSet also will not update another field, some fields are arrays others aren't, i just want to be able to pass a new dictionary object in, if the key exists, overwrite the value *unless* it's an array in which case append it, if the key doesn't exist, create it
[18:44:35] <NodeX> of course it wont update another field upon a condition if it's in the array or not
[18:48:27] <pringlescan> does anyone know how to use .hint() with Mongoose?
[18:49:17] <iamchrisf> Guys how do you promote a secondary to primary when the primary is unavailable?
[18:49:39] <iamchrisf> This EC2 outage has borked our replica set.
[18:49:55] <NodeX> it will auto promote after time
[19:04:57] <iamchrisf> NodeX: It's been over an hour
[19:09:45] <kali> iamchrisf: connect to the remaining node, do "c = rs.conf", edit c to discard the broken nodes, rs.reconf(c, { force:true})
[19:14:34] <iamchrisf> kali: exactly what I just did. Thx just got our site back online.
[19:21:15] <rickibalboa> Hi, I have a question, I'm accessing a record using findOne, and I'm also wanting to retrieve the previous and the next records, however I cant do a find({my_record_query, '$or' prev_record_query}) < not exact syntax etc, I can't do that because I don't know exactly how to find the record previous to one im looking for.
[19:34:37] <bhosie> so i'm looking for some ideas on upserting millions of records at a time quickly. I'm using a replica set and i've had to slow down the inserts so i don't crash my secondaries. i considering using the mongoimport utility but the docs seem to say that's a bad idea. Docs say journaling + replica set means 4 writes per insert. i'm considering turning journaling off. tell me why this might be a bad idea
[20:19:05] <ruffyen> so education.10gen.com is donw is that a known issue?
[20:22:40] <meghan> ruffyen it should be up by end of day
[20:33:17] <ruffyen> alright just wanted to bring it to someones attention :) its been down for a little bit hehe
[22:03:56] <konr_trab> How can I create a negating regex similar to `{"fruit":{"$not":{"$regex":"avocado","$options":"ims"}}}`? This query yields an error message, asking me to use a BSON regex type
[22:12:35] <meghan> chovy, please see blog.10gen.com for a status update
[22:12:40] <meghan> and sorry for the inconvenience!
[22:12:54] <meghan> addisonj, shoot me an email (meghan @ 10gen) and i will look into it
[22:19:09] <michaeltwofish> Anyone care to help me interpret an MMS graph? http://screencast.com/t/lTcSXgjYJ
[22:40:32] <michaeltwofish> MongoDB appears to be running normally, but graphs suddenly changing dramatically when there was unlikely to be a significant load change makes me ... curious. And I'm no sysadmin/dba :)
[23:12:44] <addisonj> meghan: just sent an email, thanks for the help!
[23:42:14] <BurtyB> Using $size on an array with elements of different types (an array and integer) doesn't seem to work is that to be expected?