Modulo, I get it!
So, this is like a conversation I had with my buddy TJC, it was fulfilling as per usual, we smoked some reefer and discussed the realizations of a wandering mind modulo 2… Punny, no!?
I have no idea what the next line is reminding me to eat? Maybe I’m thinking of a scrumptious treat. One can only hope…
Fuck. Diddly. Fiddle Faddle. That’s all.
dp [11:50 PM]
eat it
[11:51]
uh - also - to answer your question earlier. when does one decide to stop smoking or cut back? does one feel guilty / self conscious? does one do it to save money? if one is not escaping from something by inebriation then i fail to see a problem.
[11:52]
omg i just understood how scalebase does modulo
[11:52]
god I’m dumb
[11:52]
dumb
[11:52]
dumb
[11:53]
why was that such a hard concept for me.
tj [11:54 PM]
regardless of all of those things and my potential relation to them, it is merely a matter of resetting physiological tolerance. doing it regularly avoids “damn I already smoked a lot and I’m not that high, wtf"
dp [11:54 PM]shard key mod number of shards (edited)
tj [11:54 PM]
wait a second
dp [11:54 PM]
sorry excuse
[11:54]
nbo
[11:54]
i was right first
[11:55]
yes
[11:55]
to prevent collisions primary keys
[11:55]
yes
tj [11:55 PM]
you cant do that reliably unless you fuck with the autoinc nextvalue on all the nodes when you go to add a new one…
dp [11:56 PM]
its scalebase tho
tj [11:56 PM]
is that how they cheat the mod? they just bump the offsets a bunch? (when you add a new node) (edited)
dp [11:56 PM]
yeah
[11:56]
slam in a buffer and call it fixed
tj [11:56 PM]
holy shit it’s genius (edited)
dp [11:57 PM]
I’ve been noodling on that for over a week. facepalm
tj [11:57 PM]
I actually really appreciate that implementation… it’s the dumb solution with a clever fix
[11:57]
(you explained it to me just now lol, obviously I got it quickly)
dp [11:58 PM]
yes. you’re a smart motherfucker.
tj [11:58 PM]
no I mean you explained it, there was no week of thinking for me to do
dp [11:58 PM]
it was the X problem that lead me to my Y problem how does a modulo work and what is it. Yak shaving, is why I do it.
tj [11:59 PM]
holy shit
[11:59]
that’s why the vitess people were so confused about our account-to-shard distribution being so wonky xD