[01:17:13] <sovern> What happens if a replica member is way behind the master and its fellow slaves and it s started? does it accept connections adn return out of date data?
[01:42:47] <nofxx> sovern, iirc no, it'll be in STARTUP or something state
[01:43:05] <sovern> nofxx: it came up in sTARTUP2, moved to SECONDARY, and accepted connections.
[01:43:09] <nofxx> until it's up to date, it's usually very fast
[01:43:25] <nofxx> sovern, when it moved to secondary wasn't ita lready up to date?
[01:45:16] <sovern> I cant find anything saying it SHOULDNT have moved to secondary. But im curious what happens when it does -- and why my app showed a 3x increase in mongo query response.
[01:46:26] <nofxx> which stat are you using to get this 90 hours?
[06:06:51] <_blizzy_> there's an argument in programming about why mongodb is bad
[06:06:58] <_blizzy_> I was being called ignorant for using it
[09:43:32] <Zelest> lazy question, can I have 4 replicaset nodes or is the rule still to use an odd number of nodes in a replicaset?
[09:46:29] <nixstt> Zelest: you should have an odd number, if it’s even add an arbiter -> http://docs.mongodb.org/manual/core/replica-set-architectures/
[09:47:53] <Zelest> ah, same as before then :D thanks :)
[09:55:03] <_blizzy_> I hear a lot of criticism about mongo. what are some things to say to counter that?
[10:32:20] <coalado> A Mongo Query can only use one index, correct?
[11:02:11] <Soapie> Hi. Can anyone point me to a good example of Unwind using C# .Net driver 2.0?
[13:52:22] <schlitzer> hey, i have a mongo 2.4 installation with auth, and i like to upgrade to 2.6, therefore i need to have a user with the "userAdminAnyDatabase" role
[13:52:32] <schlitzer> how can i add this role to my admin user?
[13:56:25] <schlitzer> i cannot use "db.grantRolesToUser" for this, because that would require schema version 3 or 2, but my current version is 1
[14:45:41] <johnflux> I'm copy and pasting code, and I have some comments in my code like /* blah */
[14:48:11] <johnflux> doesn't work. remove the ' and it works
[15:12:12] <boucher> i have what’s probably a stupid question: i’m trying to set up a username/password on my database — i created a single user, ‘admin’ with the “root” built in role. i’m able to connect with that user (i’ve started with —auth), but that user doesn’t seem to have permissions on my actuall app database — i just keep getting unauthorized errors when my app tries to do anything
[15:12:26] <boucher> does the root user really not have permissions on anything other than the admin database?
[15:12:48] <boucher> the docs seem to say it should encompass readwriteanydatabase and adminanydatabase roles
[15:17:48] <boucher> is the issue that I need to run a db.grantPrivilegesToRole() first?
[15:29:32] <saml> {a:[1,2,3], b:[1,2,3]} i have docs like that, in aggregation, how can I $unwind a and b and zip them somehow so that I get {a:1,b:1}, {a:2,b:2}, {a:3, b:3} ?
[15:29:53] <saml> when i $unwind twice, once for a and another for b, too many rows
[15:44:08] <[diecast]> is it safer to remove a collection, then insert it or just update in place?
[16:30:10] <leandroa> hi, what happens if a key from a unique compound index is missing? it's still indexed? and how this missing key is considered? null?
[17:58:40] <kaimast> it seems very limited that 2dsphere can only handle one specific datum. am I missing something? what if i want to index coordinates that aren't on earth?
[18:14:09] <blizzow> Does the mongorouter process use a lot more CPU/RAM between 2.6 and 3.0?
[18:29:37] <kaseano> Hi, I'm new to mongo, I'm struggling with this data model: students write an essay, other students vote on it. Normally in SQL you'd have a students table, an essay table with a FK to the author, and a many-many third table for voting ex "essays-students"
[18:30:01] <kaseano> in Mongo is it best to have a student table, with an array property of essays, then each essay has an array of students that voted?
[18:30:08] <kaseano> like nested, nested documents?
[18:30:28] <kexmex> i'd have a collection with just essays
[18:33:06] <kaseano> well so in that case, a user collection, and then a votes collection would be alright right? Granted it'd be two queries (get the user, get the votes by useriD)
[18:34:07] <kexmex> oh, votes collection, i dunno, up to you
[18:34:19] <kexmex> maybe keep votes in essay doc, in an array
[18:34:34] <kaseano> a really simple app at the moment, but the landing shows a bunch of essays written (and user who wrote it), if you click on it, it gives more info ex who voted
[18:34:45] <boutell> Hi. How do I time a single query in MongoDB 3.0.x? In 2.6.x, the explain() method included the time for the query. In 3.0.x it does not. Thanks.
[18:36:24] <kexmex> lke if you have an essay and it has paragraphs or sometihng... you'd need to insert an essay, get the ID, and then insert each paragraph indivudally in a diff table
[18:41:09] <kexmex> symbol: database lowercase too for me
[18:41:21] <kexmex> kaseano: in mongo there are no transactactions so can't rollback
[18:41:24] <symbol> Ah, so you'd do online_store vs onlineStore
[18:42:00] <kexmex> so if you insert many pieces of one thing, when it breaks in the middle, you'll have a buncha orphan stuff-- so i prefer big chunks where it is logical
[18:42:01] <kaseano> well they're all one shot queries if you correctly set up the data model right?
[18:43:48] <kaseano> I have one other quick question, can you store objects with methods into mongo? Or do I have to strip off the methods into a new object? Also can I bind the JSON (BSON) directory onto an object with methods, or do I have to manually do that?
[18:43:54] <kaseano> kinda like how an ORM would work
[20:12:07] <domo> hello. when running a query like 'values.foo.bar': { $in: [ .., .. ] }, can I index on "values.foo.bar" even if data sometimes won't exist?
[20:12:18] <domo> instead of indexing on just "values"
[20:30:09] <StephenLynx> GothAlice what was the name of that kind of hosting where you provide the hardware?
[21:09:38] <Wulf> my mongodb runs on an ec2 instance and ebs drive. I would like to take consistent ebs snapshots without stopping mongodb. Is there some way to ask mongodb to write dirty buffers or similar to disk?
[21:14:26] <leandroa> it's not possible to have two mixed sparse+unique indexes? one that says a field is part of the unique compound and another it's not.. example: https://gist.github.com/lardissone/af7d77d2c02118cf3e33
[21:16:59] <Wulf> never mind, I found http://docs.mongodb.org/ecosystem/tutorial/backup-and-restore-mongodb-on-amazon-ec2/
[21:40:07] <leporello> Hi. How can I set a field in a query to value of another field?
[21:43:47] <johnflux> in aggregate, how can I do something like: { $group : { _id : NumberInt("$numWeeks"), number : { $sum : 1 } } }
[21:44:06] <johnflux> basically numWeeks is a float. I want to convert it to an int, and then group by that int
[21:44:15] <johnflux> so that 0.4 and 0.3 get grouped together
[22:26:42] <svm_invictvs> Two Morphia questions...
[22:27:24] <svm_invictvs> One, when I set an @Reference, I am getting an exception that the object cannnot be found. However, when I look at the database I see that the data is correct and I can fetch the object with the ID that's stored in the document.
[22:27:44] <svm_invictvs> And #2, I have the same problem with the query. In Morphia the query fails to return anything with the object reference.
[22:29:11] <svm_invictvs> However, if I (again) set a breakpoint and copy of the query right out of what Morphia is passing to Mongo, I get a result.
[22:29:24] <cheeser> are you saving the referenced object first?
[22:32:30] <svm_invictvs> cheeser: On line 28, I get the exception.
[22:33:04] <stuntmachine> i'm running mongo 3.0.4 on centos 6.5, and at startup i got those errors about /sys/kernel/mm/transparent_hugepage/defrag and /sys/kernel/mm/transparent_hugepage/enabled. i was able to fix the /sys/kernel/mm/transparent_hugepage/enabled one by adding a /etc/security/limits.d/99-mongodb-nproc.conf file with limits in it, but i'm still getting the warning about ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
[22:46:44] <svm_invictvs> cheeser: Finds nothing jsut before the insert
[22:47:41] <svm_invictvs> cheeser: I'm confused, though, it doesn't use that query to find does it? Or does it find it by what document it actually inserted?
[22:49:31] <svm_invictvs> cheeser: I want to enter 1) insert a new record, or 2) flip the active flag on an existing one
[22:50:05] <cheeser> then you probably don't want "active" in the query
[22:50:29] <cheeser> why are you setting the name again?
[22:50:48] <svm_invictvs> cheeser: I want to make sure that I only reactive an inactive record.
[22:50:54] <svm_invictvs> cheeser: "active" is basically a soft delete
[22:51:06] <svm_invictvs> cheeser: If it's an old record that's been deleted, I jsut want to restore it
[22:53:18] <svm_invictvs> cheeser: Correct me if I'm wrong, but findAndModify uses the query to find the object (and then modify it) not to find it again right?
[22:53:35] <svm_invictvs> cheeser: Even so, other code that works similarly has no issue.
[22:56:28] <cheeser> if the query doesn't match a document, that query is used to create a new one upon upsert
[23:06:10] <svm_invictvs> cheeser: So I tried to to just a find by ID directly in Mongo. Same error. Took all of findAndModify out
[23:06:38] <svm_invictvs> cheeser: This is the strange bit
[23:06:39] <svm_invictvs> cheeser: Could not map com.namazustudios.socialengine.dao.mongo.model.MongoPSNApplicationProfile with ID: 55ad7e32e584ba15d0493580
[23:07:39] <svm_invictvs> cheeser: The ID is not for that type. It looks like Morphia is getting confused over what type it's looking for.
[23:07:51] <svm_invictvs> That or I'm confusing it somehow.
[23:09:34] <svm_invictvs> This is my tinker project, I think I'll just let it be for now.