[18:00:59] the internet hates me today. Looks like my ISP is having peering problems or something [18:29:04] csteipp: http://antirez.com/news/75 [18:39:53] the math behind it is interesting, but for the purposes of evaluating the viability of it it's okay to just think of this as magic that lets you estimate cardinality (number of times we have observed a particular value) with pretty good accuracy and in constant space [18:42:31] one challenge is how to allow old observations to drop off, so that the hyperloglog only represents requests in the last N minutes or whatever [18:43:47] a fancy way of doing that might be to limit its size. a cruder but easier-to-reason-about approach might be to maintain two hyperloglogs, and alternate resetting one or the other every five minutes [18:47:47] T0 T5 T10 ... [18:47:47] seen_ips_a: |----------|----------|----------|----------| [18:47:48] seen_ips_b: -----|----------|----------|----------|------ [18:48:30] at the start of each request you add the IP to both hyperloglogs but check cardinality only on the older of the two [18:53:11] but as always an approach that is unfancy and obviously correct is better than an approach that is fancy and probably correct [18:53:23] so if having a key per IP works that's fine too i think [18:54:18] csteipp: (no need to reply, just pinging in case you missed it ^) [19:41:24] hello good old cabal [19:41:47] was wondering if someone had basic JS knowledge to review a change to please JSHint [19:41:58] it is related to the use of 'mw' / 'mediaWiki' variables [19:42:48] seems to me it should just be flagged as being global and there should be no need to pass it to the Jquery function wrappers. i.e. https://gerrit.wikimedia.org/r/#/c/254174/6/modules/ext.codereview.loaddiff.js,unified [19:59:08] kunal answered :-} [21:45:15] anomie / tgr|away: James is pinging me irl now. Does https://gerrit.wikimedia.org/r/#/c/254080/ seem ok as is, or can we otherwise get it +2'ed by swat? [21:45:52] csteipp: I just commented there, I think that patch is fine [21:46:18] I can drop the READ_LATEST part if it makes someone uncomfortable, it's not needed to fix the bug [21:46:26] but it seems like the right choice to me [21:46:48] csteipp, tgr: IMO it would be nice to clean it up with the fixing that unit test instead of hacking around it and fixing the caching with READ_LATEST, but that *could* be done later if necessary. [21:49:17] anomie: I don't think it's hacking around the test as it is now - I mainly chose to unset the cache rather than reset it because the code tries to limit the size of the cache and I was worried some maintenance script adding lots of users would make it huge [21:49:39] I agree the test should clear the cache anyway, I'll do that in a separate patch [21:50:26] Too bad LiquidThreads keeps us from just changing it to MapCacheLRU [22:09:31] anomie: https://gerrit.wikimedia.org/r/#/c/254300/ magic! [22:11:09] I suppose the test is race-conditiony somehow? [22:11:22] Does it take any type of time as an input? [22:51:49] anomie, tgr: I noticed that "super old phpunit blocking AuthManager" is no longer listed at https://www.mediawiki.org/wiki/Scrum_of_scrums/2015-11-18#Reading_Infrastructure, is it no longer an issue?