[00:08:28] <ericsaboia> cheeser: cause I want to bring all results, just ordered by the friends first
[00:09:02] <ericsaboia> so I'm trying to create the field "friends" to order by it
[00:18:14] <tkeith> If I use w=2, is there any good reason to set j=True?
[05:54:55] <mark____> nohup python agent.py >> /YOUR_LOG_DIRECTORY/agent.log 2>&1 & Found the command in mongodb management service,but i am unable to understand the comand ?can u please explain me a bit???
[09:17:12] <dnsdds> Is there really no way to suppress errors? I'm doing a bulk insert with continueOnError, but it still returns the error, so my framework thinks it's a problem rather than intentional and okay
[09:45:45] <Derick> you can make sure fields have a unique value though
[09:46:26] <tiller> yes but I just tried, and with a boolean you've only 3 values. true / false / null. I hoped that maybe the null's value wouldn't be part of the unique field
[09:51:52] <mark____> Synchronous replication for session data means???
[09:52:28] <ecornips> Need some info on replica sets. I'm looking into the feasibility of running various secondary non-voting/read-only members across various data centres. Each can only see the Primary Mongos in the main data centre, and not other secondaries. Docs state each instance should see each other instance, but will it cause problems if two non-voting/read-only secondaries can't see each other on a permanent basis?
[09:52:50] <ecornips> (More specifically, this question: https://groups.google.com/forum/#!topic/mongodb-user/bimN-drQ_CM )
[09:53:14] <Derick> ecornips: all members need to be able to talk to all members
[09:53:38] <Derick> ecornips: you might want to look at master-slave replication instead...
[09:54:03] <ecornips> Derick: is there any particular reason why they need to talk to all members? Shouldn't reachability to the primary ones be the important factor?
[09:54:36] <ecornips> if you think about a simple DC1-DC2 replica set, if the link between the two goes down, won't the instances on both DCs still be queryable?
[09:54:50] <Derick> ecornips: that's not how a replicaset works or is designed. It's meant for failover, which requires communication between nodes. At least they need to know which other nodes exist, to figure out which one is the fastest to sync from
[09:56:54] <ecornips> it's a system that's caching data at the edges for faster access, with very low writes
[09:57:05] <bitinn> hi guys, appreciate some help on the user role required to run mongodump, details here: http://stackoverflow.com/questions/20490291/minimum-permission-for-using-mongodump-to-dump-a-specific-db
[09:57:12] <Derick> gmg85: mongodb supports not acknowledged writes (ie, wait until the operation succeeded) and unacknowledged write (where the operation immediately returns to the client)
[09:57:21] <mark____> @derick: http://www.severalnines.com/sites/default/files/docs/Severalnines_WP_Databases_Social_Gaming.pdf page 5 line no.4
[09:57:37] <Derick> in the latter case, the client (language driver really), can continue without all documents having been deleted already
[09:57:58] <Derick> mark____: can you please ask a simple question?
[09:58:34] <gmg85> Derick, aha...where do i configure that or are acknowledged writes the default?
[09:59:01] <mark____> i didnt able to get the mean of that line in that things whether it is synchronous or asycnchronous
[09:59:10] <Derick> gmg85: in the connection string most often
[09:59:16] <Derick> gmg85: which language / driver do you use?
[09:59:36] <ecornips> in the DC1-DC2 example, if DC1 has 2 instances and DC2 has 1 instance, and a split happens. DC1 will have a primary and a secondary, while DC2 will just have a secondary. In this case won't the secondary on DC1 still receive updates from the primary, as it's reachable?
[10:00:29] <tiller> If we use ensureIndex({field: "hashed"}); and that field is an array (field: [id1, id2, id3]) does the index work for each id, or only for the block of ids? (I'm not sure I'm very clear on my point)
[10:00:39] <Derick> write the data back to the database server like " is on that line
[10:00:49] <Derick> gmg85: can you show the connection string?
[10:01:02] <ecornips> Derick: I'm struggling to see the technical constraint here then. If all secondaries can see the primary, they'll be able to sync even if its perhaps not the most efficient path
[10:01:59] <Derick> ecornips: yes, but there is no fixed primary in the replicaset concept. It's perfectly possible that at some point in the future (perhaps with a different configuration), the node in DC2 becomes primary
[10:02:47] <ecornips> Derick: agreed. In this case, I'd nominate a couple DC to have primary-capable instances (say 3 instances as per the example), and then have additional DCs with links to both of these primary-capable DCs
[10:02:52] <gmg85> Derick, not much of a connection string...this is what i have var db = mongodb.db('localhost', 27017, 'database_name');
[10:03:34] <ecornips> Derick: so all secondaries could see all primaries/voting-secondaries
[10:03:51] <Derick> ecornips: have you tried it? I am not sure if you can add a node that can't be seen by the majority... can't see why it shouldn't work besides getting lots of "cannot connect" log messages
[10:04:34] <ecornips> Derick: haven't tried it yet, that's the next step. Appreciate it's a bit of an annoying question, just trying to figure out any gotchas before I start building up 5-10 VMs ;)
[10:07:56] <gmg85> Derick, Sorry...am using the mongodb-wrapper npm module...it uses the driver i pasted above...
[10:08:21] <Derick> gmg85: yes, but which version. Is it the latest?
[10:09:57] <gmg85> Derick, 1.03 its the latest version of mongodb-wrapper
[10:10:32] <gmg85> depends on mongoDb native 1.2.x
[10:10:40] <Derick> gmg85: you use the old "mongodb.db"
[10:10:56] <Derick> you should use what's on https://github.com/mongodb/node-mongodb-native/blob/master/docs/articles/MongoClient.md
[10:11:21] <gmg85> Derick, Found that the db method also accepts a connection string..
[10:11:45] <Derick> gmg85: the reason why I point you to MongoCLient, is because that has the interface that does acknowledged writes by default
[10:11:51] <Derick> and it's the new and updated client
[10:12:09] <Derick> gmg85: please read that page, and do as it says :)
[10:13:39] <gmg85> Derick, cool..thanks...let me give it a try
[10:31:45] <bitinn> Hi Derick, not sure if you got time to take a look at this question on stackoverflow http://stackoverflow.com/q/20490291/1677057 user role permission is kinda tricky.
[10:32:00] <Derick> bitinn: yeah, sorry, I've no idea
[10:33:09] <bitinn> no problem, one day my savior would come :)
[10:33:10] <movedx_> Is turning on write concern enough to gain data integrity?
[10:33:57] <Derick> movedx_: write concerns have little to do with integrity. And it depends on which ones you set too.
[10:45:08] <movedx_> Derick: I'm just interested in gauranteed writes and data safety. I know how-to replicate and then shard, which is cool, but still, data actually being written is important.
[10:45:24] <movedx_> Derick: ACID compliance would be cool :D
[10:45:43] <Derick> you'd need a relational database for that
[10:46:02] <Derick> movedx_: journalling on for MongoDB is the most important one for "integrity"
[10:46:12] <Derick> but replication is always asynchronous
[10:46:22] <Derick> (but *can* be synchronous from a single client connection)
[10:46:44] <movedx_> So there is room for data loss before replication?
[10:47:08] <Derick> you need journalling on regardless
[10:50:56] <movedx_> SO can it be argued that the main use case for Mongo, besides its NoSQL roots and scalability, is for data that isn't mission critical?
[10:51:31] <Derick> movedx_: you can argue about that :-)
[10:51:37] <kali> it can be argued, many angry blog posts do
[10:51:41] <Derick> but it's also used in mission critical places.
[10:54:19] <movedx_> Interesting. I reckon it's perfactly fine for almost any job. I just wish querying the damn thing was easier. I find the query and filter syntax, MapReduce, etc, a right pain to understand.
[10:58:39] <kali> i think that is highly subjective... from my experience pure beginners with no SQL background tend to struggle less with mongodb than SQL
[10:59:12] <kali> and are less likely to shoot themselves in the foot
[10:59:43] <Derick> movedx_: M/R is more of a pain than the Aggregation Framework though...
[11:01:01] <movedx_> aggregation is OK, I guess. I can get my head around it eventually.
[11:36:48] <Nodex> [10:56:54] <kali> i think that is highly subjective... from my experience pure beginners with no SQL background tend to struggle less with mongodb than SQL
[13:32:36] <hanser> i have a collection that stores documents as like http://www.hastebin.com/xayujagiho.apache, how can i find document that contains given key ("DEF") and cpuid (3) for this structure ?
[19:22:29] <includex> hy gius, any tip about this: TypeError: Cannot set property 'version' of undefined at src/mongo/shell/utils.js:1008 ? when loading this sample.js http://pastie.org/8542822
[20:01:13] <staben> A User has many Requests. Some of the Requests has PriceQuotes. # E.g: u.requests.first.price_quotes . How can I do a query that returns only requests that has price quotes?
[20:05:33] <staben> cheeser: I tried with "u.requests.where('price_quote_id').exists?" but that does not seem to work. Could you please help me out with the syntax? ( Just started using MongoDB a few days ago )
[20:07:09] <staben> yeah, I'm doing the query with Mongoid.
[20:24:22] <staben> ericsaboia1: Thanks, but does that work when the relationship is like this? "PriceQuote belongs_to :request" and "Request has_many :price_quotes" u.requests.where(:price_quote_ids.exists => true).first # => nil u.requests.collect(&:price_quote_ids) # => [[BSON::ObjectId('52a770664d6172d820010000')], []]
[20:25:56] <ericsaboia1> staben: how do u save that field when u do not have an relationship?
[20:31:48] <astropirate> Is anyone here using mgo?
[20:31:58] <astropirate> It isn't reading any of my bool typed fields
[20:32:02] <astropirate> but is reading everything else
[20:32:26] <ericsaboia1> staben: where is what u are looking for: http://stackoverflow.com/questions/12167403/how-do-i-query-for-item-with-non-empty-array-with-mongoid
[21:27:15] <mikaeldice> I need to run addition or subtraction to a number value in a document, sometimes from multiple node threads simultaneously. I need to read the original value from this document prior to performing the operation. Is there a risk of a scenario where thread 1 reads the value, starts it's math, then thread 2 reads the value and starts it's math with a different add/subtract value, thread 1 writes its n
[21:27:15] <mikaeldice> ew value to the document, then thread 2 writes its computed value to the document, ignoring the change from the first thread? If that makes sense..
[21:28:29] <platzhirsch> Counting the number of associations for a document of mine takes too long. What's the strategy here? This is not indexable is it?
[23:20:07] <intellix> yeah happens automatically supposedly. I've got about 1k connections, and hitting some limit. Is there any recommendation about the amount of connections that should be allowed?
[23:28:58] <intellix> ok so it's based on your system ulimit, which is currently set to unlimited. must be some other issue then. Saw 1k connections and anew one being connected on every page refresh so thought something was wrong. I think it all looks fine though, must be something else... was getting some pipe dropped errors