Pastebin PRO Accounts EASTER SPECIAL! For a limited time only get 40% discount on a LIFETIME PRO account! Offer Ends April 2nd!
SHARE
TWEET
Hotwheels sees the havoc
a guest
Jan 30th, 2016
108
Never
- 09:33:03 ~copypaste god what a mess
- 09:33:12 ~copypaste how does this new stats thing even work?
- 09:33:17 ~copypaste it doesn't even hook into post.php
- 09:33:44 linear lmao
- 09:33:53 ~copypaste it doesn't even count
- 09:34:03 ~copypaste correctly
- 09:34:06 ~copypaste it's just addition
- 09:34:12 ~copypaste seriously what ?at
- 09:34:48 ~copypaste according to the PR...
- 09:34:48 linear it might be doing uhhh
- 09:34:51 ~copypaste "It is automatically updated as posts are created and will allow for perfect historic records to be kept."
- 09:34:58 linear oh, 'perfect', nevermind
- 09:35:00 ~copypaste i see a REPLACE thing
- 09:35:24 ~copypaste function updateStatisticsForPost
- 09:35:25 ~copypaste lol
- 09:35:25 ~copypaste ok
- 09:37:03 ~copypaste god what a mess.
- 09:37:39 ~copypaste just, how could it have gone this wrong.
- 09:38:15 linear lmao
- 09:40:03 ~copypaste oh no
- 09:40:23 ~copypaste | post_id_array | text | YES | | NULL | |
- 09:42:35 ~copypaste lel
- 09:43:38 ~copypaste ++$boardStats['post_count'];
- 09:43:47 ~copypaste how does someone possibly fuck up this badly, have you never heard of race conditions
- 09:43:49 ~copypaste i swear to god
- 09:43:56 ~copypaste no wonder all the fast boards are incorrect
- 09:43:58 ~copypaste jesus
- 09:44:06 ~copypaste how fucking high do you have to be
- 09:44:17 ~copypaste to put serialized PHP arrays into mysql
- 09:44:22 ~copypaste and use those to generate our stats
- 09:44:24 ~copypaste why why why
- 09:44:30 linear aha
- 09:44:44 linear i barely know what's happening becuase lack of code context, but
- 09:44:49 linear 20:42:51 ~ copypaste | to put serialized PHP arrays into mysql
- 09:44:50 linear ( ???)
- 09:44:52 ~copypaste yeah
- 09:44:55 ~copypaste we can't even use this. i might have to revert back and n-tech is ignoring me lmao
- 09:45:04 linear i mean, maybe there's an argument for it, but, it /sounds/ bad
- 09:45:23 ~copypaste https://camo.githubusercontent.com/a11f7752612cf60022fab87b1426424973962bba/687474703a2f2f692e696d6775722e636f6d2f65777a383672662e706e67
- 09:45:31 ~copypaste trust me, it's bad.
- 09:45:41 linear WHERE DID IT ALL GO WORNG
- 09:45:43 linear WRONG*
- 09:45:49 ~copypaste so what's happening is...
- 09:45:53 ~copypaste (i think)
- 09:46:06 linear ok honestly i have
- 09:46:10 linear NO CLUE what that schema does
- 09:46:14 linear from that image
- 09:46:19 czaks big lambdas ftw
- 09:46:21 czaks xD
- 09:46:25 ~copypaste this is a fucking mess
- 09:46:32 ~copypaste ok so every hour it makes a new row
- 09:46:33 ~copypaste right
- 09:46:42 linear n-no
- 09:46:51 ~copypaste and post_id_array contains 0 => id, 1 => id...
- 09:46:55 linear where is anonfagola when we need him
- 09:46:55 ~copypaste and it uses that to count the posts
- 09:47:08 ~copypaste but he didn't even think of race conditions. it edits the post_id_array on every post
- 09:47:13 ~copypaste two posts made at the same time, one overwrites the other
- 09:47:17 ~copypaste that's why all the fast boards are incorrect
- 09:47:19 czaks i love backporting commits where
- 09:47:21 `7185 this is hilarious
- 09:47:27 czaks beside commits
- 09:47:29 czaks author also changes
- 09:47:31 czaks } else {
- 09:47:32 ~copypaste this is a fucking mess
- 09:47:33 czaks to
- 09:47:35 czaks }
- 09:47:36 czaks else {
- 09:47:37 czaks xD
- 09:47:38 ~copypaste mhm
- 09:47:39 czaks etc.
- 09:47:40 ~copypaste and also
- 09:47:44 linear lmao
- 09:47:47 ~copypaste updateStatisticsForPost( $post );
- 09:47:48 linear screenshot it and write next to it
- 09:47:50 ~copypaste right below
- 09:47:53 ~copypaste insertFloodPost($post);
- 09:47:59 linear "// new averaging system"
- 09:48:00 ~copypaste and then these same people bitch about how we don't stick to code standards
- 09:48:03 linear then put cs_grad.jpg on it
- 09:48:03 ~copypaste AAAAAAAAAAAAAAAAAAAA
- 09:50:36 ~copypaste how does someone fuck up this badly
- 09:50:38 ~copypaste i can't even
- 09:50:48 ~copypaste the fix is to rewrite it again
- 09:50:50 ~copypaste jesus christ
- 09:51:02 ~copypaste all you have to do
- 09:51:05 ~copypaste all you have to do.
- 09:51:09 ~copypaste is write the max(id) every hour
- 09:51:18 ~copypaste this was the simplest part of the task and it's fucked up completely
- 09:51:30 ~copypaste RIP
- 09:51:30 ~copypaste I
- 09:51:31 ~copypaste P
- 09:52:23 ~copypaste he also is using less_ip
- 09:52:27 ~copypaste so the active users is off too
- 09:52:33 ~copypaste because that's unique of range
- 09:52:34 ~copypaste sigh
- 09:52:37 ~copypaste fml
- 09:52:48 ~copypaste if you want something doen right etc
- 09:53:45 czaks High Quality Tinyboard Code?
- 09:55:34 Not-3c39 [infinity] ctrlcctrlv opened issue #470: All fast boards have incorrect PPH because the new board stats shits all over concurrency - http://git.io/vfevb
- 09:56:00 linear lol
- 09:57:42 ~copypaste what might be able to be done is
- 09:58:05 ~copypaste run a background process to scan every board, SELECT id FROM posts WHERE date_sub...
- 09:58:22 ~copypaste and then add those to his shitty array thing
- 09:58:32 ~copypaste so basically run a background process to combat the shitty race condition
- 09:58:34 ~copypaste ayyyyyy lmao
- 09:58:44 ~copypaste or we revert because this is 75% inaccurate
- 09:59:20 ~copypaste hopefully n-tech will have an idea and not just ignore the problem
- 09:59:21 ~copypaste ( ???)
- 09:59:52 czaks why do we have to care about race conditions
- 09:59:59 czaks maybe let's run everything in one thread
- 10:00:03 czaks !
- 10:00:05 ~copypaste can't be done
- 10:00:11 ~copypaste i have 3 machines that can run post.php
- 10:00:43 ~copypaste because the dude is saving this huge array of posts every time
- 10:00:48 linear lol
- 10:00:49 linear how
- 10:00:49 linear high
- 10:00:50 linear ahahahahaha just HOW HIGH DO you even have to BE just to DO something like that.........
- 10:00:51 linear ahahahahaha just HOW HIGH DO you even have to BE just to DO something like that.........
- 10:00:59 ~copypaste yeah this is shit
- 10:01:29 ~copypaste also lol i just open a github issue with a chat log
- 10:01:31 ~copypaste so fucking lazy
- 10:01:36 ~copypaste he'll probably be upset at that but fuck
- 10:02:57 linear that issue
- 10:03:02 linear hilarious
- 10:13:17 ~copypaste i think i found the problem
- 10:13:59 ~copypaste nope
- 10:14:06 ~copypaste his code is really difficult to understand
- 10:14:07 ~copypaste lol
- 10:22:16 ~copypaste php > echo (int)((time() / 3600) * 3600) . "\n";
- 10:22:16 ~copypaste 1429496509
- 10:22:16 ~copypaste php > echo time() . "\n";
- 10:22:16 ~copypaste 1429496517
- 10:22:20 ~copypaste this is just getting ridiculous
- 10:22:24 ~copypaste what the fuck are you thinking?
- 10:33:19 linear 21:20:50 ~ copypaste | php > echo (int)((time() / 3600) * 3600) . "\n";
- 10:33:20 linear ( ???)
- 10:33:41 ~copypaste > $board['pph'] = round( $boardActivity['average'][ $boardUri ], $precision )
- 10:33:47 ~copypaste i've discovered the problem
- 10:34:06 ~copypaste he makes an average of the last 72 hours instead of just getting the last hour
- 10:34:28 ~copypaste the race condition issue, while still there, is not as bad as i thought
- 10:34:36 ~copypaste at least, it'll probably drop a post once in a while
- 10:34:40 ~copypaste but not always
- 10:35:28 linear hmmm
- 10:35:41 linear is 'echo (int)((time() / 3600) * 3600) . "\n";'in the code
- 10:35:41 linear lol
- 10:36:31 ~copypaste yes.
- 10:36:35 ~copypaste not the echo part
- 10:36:39 ~copypaste that was me figuring out what the fuck it did
- 10:36:40 ~copypaste lol
- 10:36:42 linear lol
- 10:37:04 linear hey do .aop add linear if you dont mind
- 10:37:08 linear i need to win my /ns alist war
- 10:38:26 linear or voice :>
- [...]
- 12:48:26 linear dem commits
- [...]
- 13:38:16 n-tech lol
RAW Paste Data
