SHARE
TWEET
more Database worries
a guest
Jan 31st, 2016
6
Never
- 10:22:58 ~copypaste i'm trying to find the schema again, it's clever
- 10:23:06 ~copypaste again, "clever" :^) so you know where i am going with this
- 10:23:13 n-tech yeah fuck, god damnit. This is raw SQL.
- 10:23:26 n-tech I'm really, really concerned about 'clever' solutions. Right now it's a clean slate. Everything is in order.
- 10:23:36 n-tech I'm worried about a situation where we're just like, oh lets borrow all these old assets
- 10:23:42 n-tech and end up with the same thing with a different name
- 10:24:01 ~copypaste doesn't matter if it's clean if it doesn't work. also we have never used KX schema before btw. i didn't know it already has this problem solved until informed of such fact by n-tech
- 10:24:05 ~copypaste no, not n-tech. czaks
- 10:24:09 ~copypaste sorry, mixing shit up in m head.
- 10:24:19 ~copypaste i never used KX on any live site.
- 10:24:34 n-tech it doesn't matter if it works if it's built like shit
- 10:24:40 ~copypaste i tried it once, but only to help STI with a migration
- 10:24:53 n-tech it has to be done right. it's worth taking time to investigating every issue to see how the convention is done.
- 10:24:59 ~copypaste ok. but we need to rethink the schema. to be honest n-tech, let's be real. 2ch's system is best.
- 10:25:01 ~copypaste OP is always >>1
- 10:25:04 ~copypaste first reply is always >>2.
- 10:25:07 ~copypaste and so on and so forth.
- 10:25:20 ~copypaste that is the most sense to the DB.
- 10:25:23 n-tech for every thread? are you sure you'd prefer that?
- 10:25:29 ~copypaste no, they won't. but that makes the most sense.
- 10:25:43 ~copypaste you need to understand that the IB use case goes against what the databas wants
- 10:25:48 n-tech it does, the board_id is literally an unintended side effect of having a table per board.
- 10:25:48 ~copypaste that's why STI did it the separate tables
- 10:26:06 ~copypaste n-tech: there ya go.
- 10:26:12 ~copypaste and we've been carrying that since 2003.
- 10:26:19 ~copypaste it's far too late to change it and is too much of a shock
- 10:26:36 n-tech oh I thought you were talking about moving to that system
- 10:26:36 ~copypaste look at this thread
- 10:27:04 ~copypaste i am saying that it is important to have this feature, even if it requires some raw SQL triggers or otherwise.
- 10:27:10 ~copypaste we can write one for mysql and one for postgres.
- 10:27:25 ~copypaste most large web applications have some raw SQL. i am sure that eloquent even has a Eloquent( ??? )ql() or similar.
- 10:27:32 ~copypaste oh, nice, my emote kicked in
- 10:27:33 ~copypaste lol
- [...]
- 10:27:52 n-tech I really don't want to halfass anything right now. anything done poorly will haunt us for 10 years
- 10:28:05 n-tech we'll think back on this shit like "fuck why did we do x we're retarded"
- 10:28:05 n-tech lol
- [...]
- 10:29:42 ~copypaste so this is the DB basics. let me install kusaba and pull their schema
- 10:29:53 n-tech but my point is that right now, we have a setup where there cannot be a duplicate board id. that means it'd be rejected
- 10:29:55 ~copypaste and i can tell you how they do it. i know for a fact it is not triggers and it exploits an undocumented "feaeture"
- 10:30:06 ~copypaste n-tech: on fast boards, like /pol/ during a chimp out
- 10:30:09 ~copypaste that's reject half of people's posts
- 10:30:12 n-tech but
- 10:30:15 n-tech we can loop it
- 10:30:17 ~copypaste you think i'm kdding, but our current post.php already has race conditions
- 10:30:19 n-tech if it's rejected for a duplicate ai
- 10:30:21 ~copypaste how is that not half assed?
- 10:30:22 n-tech we can try again
- 10:30:22 ~copypaste lmao
- 10:30:40 ~copypaste while ($noerror) tryagain(); ?
- 10:30:41 ~copypaste :^)
- 10:30:44 n-tech that seems more correct than breaking the database agnosticism almost immediately
- 10:30:45 ~copypaste what could possibly go wrong?
- 10:31:17 n-tech make it more clever. if the number of posts didn't change, bail out with an error. if it did actually go up you know a concurrency issue occured.
- 10:31:46 ~copypaste i understand your concern with the database agnosticism, i really do
- 10:31:56 ~copypaste but i also know incrementing IDs outside of the RDBMS is pure cancer
- 10:32:15 ~copypaste i have worked on threre projects that did it, and it caused problems every single time.
- 10:32:23 ~copypaste i did fix one of them with a loop in fact.
- 10:32:35 ~copypaste that's not a fix, it's a hack. if the SQL DB is waiting on posts
- 10:32:40 ~copypaste one attempt can try 10 times.
- 10:32:47 ~copypaste you think this isi a joke but i can easily write a test case.
- 10:33:05 ~copypaste database agnostic ORMs are supposed to be helpers for common things like select, insert, delete, join
- 10:33:06 n-tech I'm not saying it's a joke, I'm just extremely worried about reducing the available featureset of the framework we've adopted immediately
- 10:33:09 n-tech to whatever can support this hack
- 10:33:09 ~copypaste not excuwses to never know SQL
- 10:33:28 ~copypaste i think if we find a way to support it in sqlite, postgres, mysql
- [...]
- 10:33:57 czaks this case for mysql we talked about?
- 10:34:00 ~copypaste yes
- 10:34:06 czaks myisam and aria support that
- 10:34:06 ~copypaste remember this discussion? i still have the log
- 10:34:10 ~copypaste oh yeah?
- 10:34:13 ~copypaste just innodb doesn't?
- 10:34:13 czaks yes
- 10:34:17 czaks and innodb doesn't
- 10:34:20 ~copypaste great. so we can just reject innodb.
- 10:34:33 ~copypaste Does Eloquent even let you pick?
- 10:34:37 ~copypaste i guess when you CREATE DATABASE
- 10:34:43 czaks just that aria is only in mariadb
- 10:34:48 ~copypaste that's fine.
- 10:34:53 czaks and you rejected mariadb back in the times xD
- 10:34:56 ~copypaste fuck mysql. i install mariadb and we save 50% CPU
- 10:34:59 ~copypaste haha :DDD
- 10:35:04 n-tech I'm sure there's a way to not support specific schemas, but really? we're not going to support innodb?
- 10:35:05 ~copypaste it wasn't so popular back then
- 10:35:10 czaks because muh stable software
- 10:35:22 ~copypaste as i said, it wasn't so popular back then, mariadb
- 10:35:27 czaks i see
- [...]
- 10:37:46 ~copypaste i think the main conflict is that i wouldn't mind doing that sometimes, where n-tech is opposed to ever writing SQL
- 10:37:47 ~copypaste :DD
- 10:38:08 ~copypaste it's this
- 10:38:09 ~copypaste http://laravel.com/docs/4.2/eloquent
- 10:38:32 n-tech 5.0
- 10:38:38 n-tech 4.2 is the old version, be careful of reading old doc
- 10:38:41 ~copypaste oh
- 10:38:45 ~copypaste you already adopted 5
- [...]
- 10:49:26 n-tech it actually makes me sort of nauseous to think
- 10:49:35 n-tech that we're going to have to code in this huge fucking ordeal
- 10:49:38 n-tech to support some autistic bygone
- 10:49:42 n-tech fuck man
- 10:49:44 ~copypaste i know. i'm sorry.
- 10:49:54 ~copypaste but changing the numbers would destroy autism
- 10:50:21 @linear i dont even want to know what is happening
- 10:50:31 ~copypaste linear: we're rewriting 8chan
- 10:50:33 ~copypaste infinitydev.org
- 10:50:35 ~copypaste (? ????)??
- 10:50:42 @linear how much of it
- 10:50:44 [Desu] trying to prevent patrick bateman from crying by the sounds of it
- 10:50:45 n-tech lol
- 10:50:46 ~copypaste everything.
- 10:50:48 n-tech just the tip linear
- [...]
- 10:51:06 ~copypaste we are quite literally trying to fix dubs right now
- 10:51:07 [Desu] hehehe
- 10:51:12 ~copypaste i'm not even joking
- 10:51:13 [Desu] hheheheheh
- 10:51:15 [Desu] glorious
- 10:51:16 ~copypaste this whole argument is over dubs/trips/quads.
- 10:51:17 ~copypaste lo
- 10:51:18 ~copypaste l
- 10:51:20 n-tech just fuckig tink
- 10:51:22 n-tech of a world
- 10:51:26 [Desu] Patrick Bateman smiles upon you this day
- 10:51:30 n-tech where udina doesn't shitpost every 100,000 post
- 10:51:35 n-tech do you want to live in that world
- 10:51:38 [Desu] gno
- 10:51:59 n-tech i guess /udina/ is more of a pissposter tho
- 10:52:09 [Desu] /undina/?
- 10:52:19 n-tech that's the one
- [...]
- 10:55:48 n-tech ; ; i still think my loop hack is better than requiring certain databases
- 10:55:49 ~copypaste right
- 10:55:53 n-tech i am a simple man with simple concepts
- 10:56:01 [Desu] it gives a good idea if the board is active too.
- 10:56:07 ~copypaste the loop hack is awful and puts unneeded strain on the db
- 10:56:15 ~copypaste please talk sense in to him linear i need to go away for a few mins
- [...]
- 11:02:26 ~copypaste n-tech: i know this is autistic but they won't want to use it if the numbers aren't right
- 11:02:35 ~copypaste i am 100% certain of that
- 11:02:50 ~copypaste so i am in favor of drop innodb.
- 11:02:54 ~copypaste and use KX like schema.
RAW Paste Data
