PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Friday the 10th of June, 2016

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[09:23:45] <Zelest> I still hate the "syncingTo" field in rs.status()
[09:23:51] <Zelest> it's confusing as hell :S
[09:52:27] <Zelest> Derick, i'm reading the upgrade guide from 3.0 to 3.2, and it tells me to "upgrade the replication protocol", setting cfg.protocolVersion=1 .. what's that? and what's new in the protocol? :o
[10:01:20] <Derick> Zelest: sorry, beats me
[10:01:28] <Zelest> okey :)
[10:01:36] <Zelest> anyways, now the whole cluster runs 3.2 :D
[10:01:39] <Zelest> 5 nodes
[10:03:25] <Zelest> Derick, ah! https://docs.mongodb.com/manual/reference/replica-configuration/#rsconf.protocolVersion
[10:06:08] <Derick> or rather https://docs.mongodb.com/manual/release-notes/3.2/#rel-notes-rs-enhancements
[10:07:08] <Zelest> true :)
[10:10:44] <Zelest> still, someone should fix "syncingTo" :(
[10:11:17] <Zelest> especially since lastHeartbeat gets it right: "syncing from: foo.bar.tld:27017"
[10:14:09] <Derick> because it'sthe wrong way around?
[10:19:03] <Zelest> Derick, yeah, "syncingTo:" sounds like that replica member is sending data TO that machine
[10:19:07] <Zelest> when it's the other way around yeah
[10:19:49] <Zelest> no biggie when it's between a secondary and the primary, but it gets confusing when it's two secondaries syncing from/to each other
[10:23:15] <kknight> db is not defined at src/mongo/sh
[10:23:19] <kknight> how to fix abhove
[10:23:41] <kknight> when i am typing show db it gives abgove error
[11:48:47] <ShekharReddy> mongoose.model('Book', bookSchema); what does this wriiten if I have bookSchema same as collection in db and Book is a variable accessible from anywhere
[14:36:06] <php> Hey there!
[14:37:08] <php> I'm using Mongo's Java Driver - I'm quite new - and I am wondering how I can do this... I have a schema, { "_id": objectid, "owner": java unique id as a string, "members": {java uuid as string, java uuid as string, ...}}
[14:37:17] <php> I currently search for the documents by owner
[14:37:24] <php> DBCursor cursor = MongoCollections.getGuildsCollection().find(new BasicDBObject("owner", uuid.toString()));
[14:37:46] <php> I now want to search where owner = uuid.toString() or members contains uuid.toString()
[14:58:44] <StephenLynx> cheeser might know
[15:02:13] <cheeser> php: can you pastebin your code?
[15:02:36] <php> cheeser, the code above is exactly as I have it
[15:02:49] <php> getGuildsCollection() returns a DBCollection
[15:02:57] <php> uuid instanceof UUID
[15:04:18] <cheeser> no, that code is not exactly as you have it as that code won't compile
[15:10:01] <php> cheeser, http://hastebin.com/limibinire.java
[15:11:04] <pchoo> Hello all, I'm looking at adding an index to a collection. I'd like for it to be a unique sparse index. would this allow me to have multiple null values?
[15:22:01] <cheeser> null is a valid value so, no
[15:22:10] <cheeser> php: one moment. in a meeting.
[15:43:01] <cheeser> php: ok. 2 thoughts: 1) what's the problem? and 2) why not use Morphia for this? it'd handle all the mapping for you.
[15:54:45] <php> >> Hey there!
[15:54:54] <php> >> I'm using Mongo's Java Driver - I'm quite new - and I am wondering how I can do this... I have a schema, { "_id": objectid, "owner": java unique id as a string, "members": {java uuid as string, java uuid as string, ...}}
[15:55:02] <php> >> I currently search for the documents by owner
[15:55:11] <php> >> DBCursor cursor = MongoCollections.getGuildsCollection().find(new BasicDBObject("owner", uuid.toString()));
[15:55:21] <php> >> I now want to search where owner = uuid.toString() or members contains uuid.toString()
[15:55:24] <php> cheeser, ^
[15:55:29] <cheeser> you don't need to repaste everything...
[15:55:35] <php> Also I don't control this project, so what libraries we use is not up to me
[15:55:39] <cheeser> fair enough
[15:55:51] <cheeser> what query have you tried?
[15:56:19] <php> I've tried nothing. No idea how to do this. The examples I find are JavaScript and I'm unsure how it translates to Java
[15:57:19] <cheeser> https://docs.mongodb.com/manual/tutorial/query-documents/#query-on-arrays
[16:18:18] <pchoo> cheeser: Thanks, I would omit the value, but the "ORM" package we are using fills empty values with null
[16:19:13] <cheeser> well, that's just wrong.
[16:19:21] <cheeser> null and empty are very different
[16:23:46] <pchoo> cheeser: Yeah, I'm looking to see if it's a functionality I can disable.
[16:55:36] <php> cheeser, I know how to query from the console
[16:55:43] <php> but not how to query an array from java
[17:02:47] <elynch_vmi12> Anyone know where to resell MongoDB World tickets?
[17:03:23] <elynch_vmi12> My group cant make it to New York in that time frame
[17:25:12] <elynch_vmi12> Anyone know where to resell MongoDB World tickets?
[17:43:06] <StephenLynx> ¯\_(ツ)_/¯
[17:43:11] <StephenLynx> serves you right for going out.
[19:19:05] <Gliesian66> 'ello
[19:19:10] <Gliesian66> Anyone here?
[19:19:52] <Gliesian66> Could someone help me with a couple of Schema Design questions?
[19:20:29] <dino82> mms says Data Size is 33.4GB. df -h says the disk that only contains the mongo database has 255GB of data. wtf
[19:24:11] <dino82> This happened last time, disk filled up, the mongos never got out of STARTUP2
[19:25:28] <Gliesian66> actually, I have a simpler question.
[19:25:56] <Gliesian66> How do I persist a date into mongodb from a GMT/UTC time/string in PyMongo?
[19:26:16] <Gliesian66> How do I persist a ISODate into mongodb from a GMT/UTC time/string in PyMongo?
[19:34:09] <StephenLynx> you have to see with your driver what is the format used to parse into dates when storing into mongo.
[19:35:22] <cheeser> dino82: mmapv1?
[20:10:55] <dino82> cheeser: rocksdb
[20:11:20] <cheeser> oh, well, ask facebook about that one, then.
[20:11:45] <dino82> We have one master and one secondary, trying to setup a third node and it's been giving me all kinds of grief
[20:12:01] <StephenLynx> rocksdb?
[20:12:18] <cheeser> file storage format from parse.com
[20:12:29] <dino82> yeah, it's from an app we migrated off of parse
[20:12:40] <cheeser> migrate to wiredtiger
[20:12:59] <cheeser> WT will release disk space back to the OS
[20:13:41] <dino82> this may sound like a n00b question but I can't have different engines in the same replica set, can I?
[20:13:58] <dino82> I'm not an expert on this quite yet
[20:15:31] <cheeser> sure you can
[20:16:50] <dino82> Oh -- cool. I'll give that a try then
[20:37:43] <Gliesian66> hi there...
[20:38:21] <Gliesian66> now for the sensor example... why aren't the sensors preaggregated by sensors (e.g., collection names are the sensor ids)
[21:04:31] <php> How do you execute these queries with the Java Driver? https://docs.mongodb.com/manual/tutorial/query-documents/#query-on-arrays
[21:05:47] <cheeser> you create BasicDBObjects for each {} you see.
[21:08:14] <php> cheeser, oh :D
[21:08:26] <php> cheeser, is there such thing as "OR" in Mongo?
[21:08:37] <cheeser> of course
[21:08:37] <php> like in MySQL, where you can do this OR this OR this
[21:08:47] <cheeser> https://docs.mongodb.com/manual/reference/operator/query/or/
[21:08:52] <cheeser> https://docs.mongodb.com/manual/reference/operator/query/and
[21:10:22] <php> cheeser, so new BasicDBObject("$or", new BasicDBObject("$in", new BasicDBObject("members", uuid.toString())))
[21:10:22] <php> ?
[21:10:26] <php> wait
[21:10:31] <php> i messed that up maybe
[21:10:34] <php> yeah, i did
[21:10:39] <php> i need the or there tho
[21:10:41] <php> hmm
[21:10:48] <php> I think I know
[21:11:04] <php> where i have the second object, i need an array
[21:36:03] <php> cheeser, https://gist.github.com/anonymous/45d07af3281f9a571efcdd0fc53366c9
[21:36:06] <cheeser> you don't need a $or for a single element
[21:36:07] <php> Does that look right?
[21:36:33] <php> My code up there was incomplete
[21:37:53] <cheeser> does it work?
[21:38:13] <php> cheeser, does it look right?
[21:38:24] <php> Building this project takes about 5-10-15 minutes
[21:38:35] <php> so I'd rather have another pair of eyes say if it looks ok first
[21:42:54] <cheeser> it looks ok, yeah.
[21:43:08] <php> ok thanks
[21:43:12] <php> now the build
[21:44:43] <php> cheeser, does $or support as many ors as I need?
[21:44:53] <cheeser> yes