[00:15:41] <StephenLynx> and extremely slow while at it
[00:36:46] <zamnuts> mongodb v3.0.8, nodejs driver v2.0.55: cursor.count never invokes callback: cursor.find(true,function(err,count){/* never gets here */}); cursor server = null, cursor connection = null, but cursor find query is _correct_ any ideas?
[00:38:04] <StephenLynx> 2.1.7 is the latest release
[00:38:55] <zamnuts> StephenLynx, 2.0.55 is the latest 2.0 patch version, i've tried updated to 2.1.7 but other queries aren't working as expected, level of effort is too great to upgrade minor versions right now
[00:39:16] <zamnuts> s/updated/updating/ (grr, can't type today)
[01:15:56] <StephenLynx> because the thing that called this function could handle the callback of the last function that takes a callback
[01:16:19] <StephenLynx> zamnuts, those libraries are awful.
[01:16:26] <StephenLynx> they have a huge performance impact
[01:16:30] <kryo_> so i should not handle each error individually?
[01:16:30] <StephenLynx> and makes code less intuitive
[01:16:35] <zamnuts> StephenLynx, everything is awful to you :(
[01:16:44] <StephenLynx> you could send the error to the top callback.
[01:16:56] <StephenLynx> and then have the thing that started the operation to handle it.
[01:17:02] <zamnuts> kryo_, the point is, if you set up your error handling correctly in Transaction/Balance, you don't have to handle each error individually
[01:17:20] <kryo_> seems like i could provide more specific error messages this way
[01:17:33] <kryo_> especially helpful for debugging
[01:17:38] <zamnuts> kryo_, why? what is more specific than a properly constructed Error object?
[01:19:12] <StephenLynx> see how the callback this function takes is passed directly to writeData
[01:19:12] <zamnuts> if you attach a specific error code to your error object when it is created, then you can use at as a lookup in a hash table or something for UX/UI side of things if that is applicable
[01:19:32] <StephenLynx> so this function doesn`t have to handle the error from that, the thing that called this function handles that error
[01:20:02] <StephenLynx> this way you can abstract the parts of your code
[01:20:44] <zamnuts> aside: time to graduate from console.log to a _real_ log lib, e.g. winston
[01:22:03] <StephenLynx> using a lib for loggin is awful
[01:22:24] <kryo_> for a 400 line project i think i'll stick with console.log :P
[01:22:36] <StephenLynx> I have a 30k LOC one and I use console.log
[01:22:41] <StephenLynx> or crashes to output stacks
[01:23:48] <StephenLynx> I should`ve checked that.
[01:24:00] <StephenLynx> but it was never an issue
[01:24:25] <StephenLynx> since I have a special mode for the crashes
[01:26:47] <kryo_> hmmmm ty for that pastebin zamnuts
[01:27:51] <zamnuts> kryo_, yw, just a diff way to think about it, many people frown on the use of that async module in favor of promises although it is still maintained and improved upon
[01:28:17] <kryo_> i have used promises before but it's a pretty big job to figure it all out
[01:54:58] <rpdprd> so I'm using genghis, and I have a field named "default". Unlike the other fields which simply appear as fieldName without quotes, default appears as "default" with quotes. Any idea why this is?
[01:56:41] <StephenLynx> you should try to contact their devs.
[01:57:30] <rpdprd> yeah, it seemed a bit odd because in mongo shell, the "default" field name doesn't appear any differently. maybe it's something json/javascript related
[01:57:41] <rpdprd> as long as mongodb doesn't have an issue with field named "default", I'm not concerned
[01:57:59] <StephenLynx> it would be {default:"thing"}
[01:58:04] <StephenLynx> that would trigger your issue?
[01:59:34] <StephenLynx> thats an issue with your thingie.
[01:59:43] <StephenLynx> default isn't a reserved word on js, afaik
[02:00:08] <StephenLynx> except for when you use a switch
[02:00:23] <rpdprd> thanks. I didn't think so either. it just seemed like a weird thing for genghis (running on PHP) to do. I'm going to stop using it sooner or later so it's not a big deal
[02:04:09] <StephenLynx> I think its something with your thing
[02:05:09] <rpdprd> thanks. https://docs.mongodb.org/manual/reference/limits/ also doesn't mention "default" as some reserved keyword, etc, so either i'll avoid it for now, or change it to something like "def" instead
[02:05:48] <StephenLynx> i wouldnt be concerned with mongo
[02:07:39] <rpdprd> genghis is a web interface (uses javascript), since default is a js keyword, it might be problematic with node and genghis
[02:56:25] <zamnuts> rpdprd, mongodb has no problem w/ the word "default" being a key in an object, even in standard js you could even write var a = {default:1} -- don't let bad syntax highlighters fool you
[03:03:28] <rpdprd> zamnuts: thanks. I looked into genghis and it seems to be something with javascript
[03:03:54] <rpdprd> or perhaps genghis. the json file of the data seems correct, it's probably genghis's problem
[03:03:59] <zamnuts> rpdprd, i'm curious as to what, i just scanned the src and couldn't find where it would be a problem
[03:04:29] <rpdprd> zamnuts: yea, I did the same thing, did a search for "default" in php, couldn't find anything constructive
[03:04:45] <rpdprd> zamnuts: same as the json served by the php server, so it makes me think it's something in the genghis frontend
[03:06:38] <rpdprd> {"count":1,"page":1,"pages":1,"per_page":50,"offset":0,"documents":[{"_id":{"$genghisType":"ObjectId","$value":"56bfed849287bf9fb9e5b05a"},"default":"hello world"}]} is the json document served by genghis, and nothing seems odd about the default field, so I suspect it's something in the frontend (that genghis fetches on demand from a cdn)
[07:54:35] <Drzoid> someone may guide me about setting up a one-collection replication from a master db to a new (empty) slave one ? (i'm too affraid to make mistake since english isn't my native language and i didn't understood the docs well ^^')
[11:59:25] <bilr> hello. Is there a dedicated channel for generic wiredtiger question? Is it ok to ask here if there isnt?
[13:04:44] <kurushiyama> I am currently reworking the spec files for the rpms. Is there a preferred branch I should work on? Currently, I am working on 3.2
[20:49:12] <jiffe> so what exactly does 'replSet need to rollback, but in inconsistent state; mean?
[20:59:57] <jiffe> that's followed by minvalid: 56c0be65:15 our last optime: 56c0be5f:5
[21:56:15] <kurushiyama> jiffe: It is clear to you what rollback means or shall I explain it?
[22:25:28] <pac1> Hello. I have cursor running in mongo shell, with an insert: d.forEach(function(x){ db.tokens.insert(x,{w:0})}). This runs very slowly. (about 1 insert per second.) No indexes on tokens. Why is it so slow?
[23:11:19] <kurushiyama> Gasher: Google it. pretty hard to explain.
[23:11:37] <kurushiyama> Freman: physical memory on that machine?
[23:12:06] <Freman> thanks, kurushiyama, it might not seem like it, but I do appreciate the help and info you guys offer up. I'm just getting tired of being lumped with the organizations mongo issues and wish they'd just hire someone that knew mongo (I'm closer to being a MySQL support engineer - a job I actually turned down before sun/oracle bought it than anything Mongo related)
[23:13:04] <kurushiyama> Freman: I AM a certified MongoDB associate...
[23:13:05] <Gasher> kurushiyama; tried googling and ducking, didn't find much
[23:13:51] <kurushiyama> Gasher: Explains it pretty well: https://en.wikipedia.org/wiki/Optimistic_concurrency_control
[23:15:12] <Freman> so, looks like we have 256gb of memory
[23:15:27] <kurushiyama> jiffe: Ok, here is what I would do: Create a backup of both an instance without the need to rollback and one of the instance which needs rollback (datafiles, if necessary)
[23:16:28] <kurushiyama> jiffe: Then, follow the procedure described here https://docs.mongodb.org/manual/core/replica-set-rollbacks/
[23:17:08] <Gasher> kurushiyama; I didn't understand much from that website... Should I just leave that field be?
[23:19:24] <Freman> I assume because we're not using Mongo 3 that it's probably MMAPv1
[23:21:20] <jiffe> kurushiyama: so reading that it sounds like that is applicable if the rollback was already completed successfully
[23:21:42] <kurushiyama> Freman: Yes. Well, the memory surely is closing in at it's limits, but quite a bit away from being critical. What is the IOWait percentage? Use "top" on the machine to find a rough estimate. While at it, the system load might be helpful to determine wether you are in real trouble or not.
[23:31:31] <jiffe> I see, no we're a telco so plenty of bandwidth and rackspace
[23:32:18] <kurushiyama> Freman: To make a long story short: You wont get a suggestion on wether to migrate to WT or not. There are so many factors to be taken into account, this can easily take hours (and I make my living of those hours) ;)
[23:32:20] <jiffe> we used supermicro machines and seagate HDs so the machines came out to be pretty cheap
[23:32:20] <Freman> (yeh helps if you actually connect and ask it how it's configured vs going off overheard conversations.)
[23:32:40] <Freman> I understand kurushiyama, and I appreciate it
[23:34:16] <kurushiyama> Freman: My suggestion is to stay calm, and get yourself a decent MongoDB DBA *caugh* to review your setup and help you to decide on what actions need to be taken, if.
[23:35:10] <kurushiyama> Freman: As long as your disks are holding, the emergency plan should be to increase RAM, if that's feasible (calculate conservatively).
[23:42:07] <kurushiyama> jiffe: That's really a... not so nice thingy...
[23:42:36] <kurushiyama> jiffe: Trying to wrap my head around it.
[23:43:22] <jiffe> the seagates are what killed us, they've been dying on us a lot lately, we're switching slowly to WDs
[23:44:27] <kurushiyama> There is a German joke about Seagate: "Sie geht oder sie geht nicht!" where "Sie geht" is pronounced (slightly incorrectly) like "Sea gate"
[23:45:00] <kurushiyama> The meaning is: "They work – or dont."
[23:49:40] <kurushiyama> Freman: could well be. Without hard facts, that is hard to say.
[23:49:58] <kurushiyama> jiffe: You should not run that. There have been nasty bugs.
[23:50:17] <Freman> thanks tho, did just have a chat with the cto (he walked in while I was talking to you) and he's going to get the guys using that db to go through and clean it up
[23:50:18] <kurushiyama> jiffe: Though not related, iirc.
[23:55:40] <Freman> so uh kurushiyama, as a certified fella, I wonder what your opinion is of this https://github.com/freman/queryguard (I know the best way would be to give them an interface so they don't touch the db, but devs are devs :()
[23:56:23] <Freman> I discovered I could abuse the bson sent in the packet to include extra detail in the currentOp()s