PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Wednesday the 3rd of August, 2016

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[01:27:02] <Freman> so
[01:27:11] <Freman> I deleted a butt ton of stuff
[01:27:19] <Freman> how to I make it mongo free up space?
[02:08:36] <docmur> I have the following encrypted database information: http://pastie.org/10927371 I have the following C code, trying to read that information: http://pastie.org/10927373, The problem is I'm getting (null) from the printf of str. Does the mongo C driver have a function to get the information from the database?
[02:43:56] <atomicb0mb> guys, is there any manual explaining how to upgrade mongodb to the last version?
[02:46:55] <atomicb0mb> hellooooooooo????
[02:51:45] <atomicb0mb> nodoby knows?!
[03:46:41] <Boomtime> @atomicb0mb: if you are upgrading from 3.0 (to 3.2) -> https://docs.mongodb.com/manual/release-notes/3.2-upgrade/
[03:47:05] <Boomtime> if you have 3.2 and want to patch to the latest revision -> https://docs.mongodb.com/manual/tutorial/upgrade-revision/
[03:47:28] <atomicb0mb> Thank you so much bro! :)
[03:47:32] <atomicb0mb> god bless u
[09:07:28] <ralfbergs2> Hi all.
[09:09:11] <ralfbergs2> Can somebody help me? I need to design a HA architecture for MongoDB in AWS, where I only have two availability zones (AZ).
[09:09:20] <ralfbergs2> If one AZ goes down, all instances in this AZ are unavailable.
[09:09:28] <ralfbergs2> My plan is to host "master" in one availability zone, "slave" and "arbiter" in the other.
[09:09:46] <ralfbergs2> Should the zone with the master go down, slave and arbiter would make "slave" the new "master", so all should be fine.
[09:10:16] <ralfbergs2> Should the zone with slave and arbiter go down, then what? Would Master become slave (read-only) as it can't confirm it should remain master?
[09:10:37] <ralfbergs2> Is there any solution to this dilemma?
[09:39:56] <Faris> Yo guys, what happened to mongodb's community repository gpg signature?
[10:10:03] <bunbury> hi all
[10:10:07] <bunbury> morning
[10:10:30] <bunbury> is there docs on mongodb windows install ?
[10:17:39] <Faris> bunbury, yes there is
[10:18:05] <Faris> https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/
[10:18:17] <Faris> rtgm
[10:18:49] <bunbury> thanks I googled it
[10:19:36] <bunbury> I installed mongodb days ago. In control panel it shows as MongoDB 3.2.7 2008R2Plus SSL (64 bit)
[10:19:45] <bunbury> is that the right version ?
[10:21:00] <Derick> I'm no windows user, but it looks like it's the right one.
[10:28:44] <bunbury> why does it have 2008 R2 in the name ?
[10:28:51] <ralfbergs2> Hi guys, is there anyone here who can help me with setting up a HA cluster of MongoDB? I have certain restrictions due to AWS, and I need some help how to lay out components...
[10:28:52] <bunbury> mongod is not on path either
[10:29:26] <Derick> bunbury: I think it's just the windows platform it's been built on
[10:29:30] <Derick> (or targetted to)
[10:31:54] <bunbury> theres no service for mongodb either
[10:32:28] <bunbury> installer doesnt do enough it seems
[10:32:56] <bunbury> should I bother using on windows on do a virtual machine ?
[10:34:30] <Faris> ralf: u can use this ansible role: https://github.com/UnderGreen/ansible-role-mongodb/
[10:34:39] <Faris> ralf: works very well with 3.2
[10:35:33] <Faris> bunbury: use a virtual machine, you'll have a lot less headaches and more community support
[10:35:46] <Faris> bunbury: or docker :)
[10:36:58] <bunbury> the docker wants hyper-v on windows
[10:37:04] <bunbury> I use vmware mostly
[10:37:17] <bunbury> I dont use ansible or puppet
[11:00:23] <ralfbergs2> Faris: Thank you, this looks helpful. I have some questions (sorry if they're stupid, I don't know a thing about MongoDB):
[11:00:50] <ralfbergs2> Faris: This doesn't seem to use "sharding?" And also "config servers" seem not to be used?
[11:05:50] <Faris> ralfbergs2, nope, that ansible role only does replica sets. I've never did sharding so I can't help you on that one.
[11:06:55] <ralfbergs2> Faris: Thanks anyway.
[13:15:43] <quattro_> I’m having some random issues with my mongodb replicaset (3.2.8), occasionally the cpu usage will go to 100% all the time on the primary which makes my whole app slow
[13:15:57] <quattro_> the workload is fairly constantly so I have no idea what is causing this high load
[13:17:04] <quattro_> http://imgur.com/a/GumVQ here’s an overview of the stats right now
[13:26:20] <ohmyfromage> here is an example of an element in my json http://pastebin.com/DJ1yeQ1s
[13:26:38] <ohmyfromage> how would I query all elements that have source and target undefined?
[13:36:06] <quattro_> even if I shutdown traffic to the replicaset the cpu usage still remains at 100%
[13:49:24] <Faris> quattro_, did u look at mongo's logs?
[13:49:51] <quattro_> Faris: yeah nothing in mongo’s log
[13:51:57] <quattro_> only thing I can do to solve it is step down the primary
[14:50:04] <docmur> I have the following encrypted database information: http://pastie.org/10927371 I have the following C code, trying to read that information: http://pastie.org/10927373, The problem is I'm getting (null) from the printf of str. Does the mongo C driver have a function to get the information from the database?
[15:39:13] <Faris> docmur, what do you have in your query?
[15:39:47] <docmur> I actually fixed, by accessing the value_type and then accessing the bson_type structure and pulling out the str of the v_utf8.
[19:22:20] <n1colas> Hello
[21:13:45] <despai> hello
[21:14:19] <despai> having a collection with startDate and endDate (with times) how can I group the documents by consecutive days? I'm turning crazy with this
[21:16:46] <cheeser> https://docs.mongodb.com/manual/reference/operator/aggregation/dayOfMonth/
[21:17:35] <cheeser> order by date, group by $year and $dayOfMonth
[21:20:25] <despai> that won't give a group of consecutive days
[21:20:30] <despai> that will retrieve a group by day
[21:20:38] <despai> which is a different thing
[21:21:08] <despai> $dayOfMonth gives groups by day instead of by consecutive days
[21:21:15] <cheeser> the sort puts the consecutive days together...
[21:21:32] <cheeser> what exactly are you trying to get then?
[21:25:35] <despai> groups by documents that have consecutive days
[21:28:38] <cheeser> and the group id would be what? what are the boundaries?
[21:29:59] <despai> this is what I dont know
[21:55:59] <despai> guys, do you think that with aggregate I can group by consecutive days of the month
[21:56:06] <despai> or is it a must to use mapReduce
[22:00:57] <cheeser> i don't see how aggregation can do that. you don't really have clear group boundaries.
[22:01:36] <inspiron> from mongo shell how can i check a collection to see a specific field ever has a value? I want to see if "myField" ever has a value associated with it in a given collection
[22:06:26] <trq> db.collection.find({ myField: { $exists: 1, $ne: null } }).legnth()
[22:07:38] <inspiron> great, thanks!
[22:14:16] <johnjohn101> just to make sure this is correct. the only way to project just one field in a subdocument is to use a $project from the aggregation framework, right?
[22:14:56] <cheeser> you can do projections with find(), too.
[22:15:30] <johnjohn101> cheeser: i know
[22:15:55] <cheeser> ok...
[22:16:33] <johnjohn101> i have this document and want to return {answer : 06/08/2016} i can do this in aggregation but wasn't sure i could do in just the find. http://paste.ubuntu.com/22083147/
[22:16:57] <cheeser> you "know" but you weren't sure?
[22:17:06] <johnjohn101> db.tractors.aggregate([
[22:17:06] <johnjohn101> {$project : { _id : 0, answer : "$output.answers.dateOfInspection.answer" }}
[22:17:06] <johnjohn101> ]) ;
[22:17:10] <johnjohn101> oops
[22:17:26] <johnjohn101> i don't know if i can do that without the aggregation framework
[22:17:37] <johnjohn101> sorry about the multiple lines
[22:18:17] <joannac> Why don't you try that but with a find() instead?
[22:18:36] <cheeser> yeah. because i just said you could and you said "i know"
[22:19:49] <johnjohn101> "Projection cannot have a mix of inclusion and exclusion.
[22:20:17] <johnjohn101> do you want to me reask in the correct way?
[22:20:55] <cheeser> with the exception of the _id field
[22:20:55] <joannac> how about you paste the exact find() you're using
[22:21:32] <johnjohn101> db.tractors.find({},{ id :0 , answer : "$output.answers.dateOfInspection.answer"})
[22:21:41] <cheeser> nope
[22:21:58] <cheeser> db.tractors.find({},{ id :0 , "output.answers.dateOfInspection.answer" : 1})
[22:22:07] <cheeser> the docs cover this pretty well
[22:22:14] <johnjohn101> cheeser that returns the whole subdocument
[22:22:33] <cheeser> the answer subdoc, yes
[22:22:52] <johnjohn101> i was just looking to get only one field
[22:23:51] <joannac> hrm. that is not the way I remember projection working.
[22:23:57] <joannac> okay, no you can't
[22:24:03] <joannac> you have to use aggregation
[22:24:12] <johnjohn101> thanks and i know how to do that :)
[22:24:24] <johnjohn101> just wanted to make sure
[22:24:37] <cheeser> oh, right. yeah, it returns the nested structure down to that field.
[22:24:38] <johnjohn101> i find myself using aggregation about all the time tbh
[22:25:06] <johnjohn101> just thought i was thick headed
[22:25:13] <cheeser> nope
[22:25:43] <johnjohn101> i love mongodb more since i took a mongodb university class
[22:26:18] <joannac> try db.foo.find({},{ _id :0 , "output.answers.dateOfInspection.answer" : 1}).next().output.answers.dateOfInspection.answer
[22:27:58] <johnjohn101> never heard of .next()
[22:28:16] <johnjohn101> oh
[22:28:19] <johnjohn101> cursor
[22:28:22] <johnjohn101> DOH
[22:31:28] <johnjohn101> ok, i get that example
[22:41:37] <jamieshepherd> Hey. I have a collection of matches, with an array of players [0,1,2,3], where each player has a nickname. I want to return all of my matches that a specific player has played, ie. where the player's nickname exists in the players array
[22:45:39] <jamieshepherd> Kinda something like where players[ANY].username is equal to foo
[22:57:25] <jamieshepherd> or where players contains an array with the username foo