You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Psql supports it as well. SQLite does with a CREATE TRIGGER. Unfortuantely, in MySQL in only one engine InnoDB this is impossible.
Looping forever like (psuedocode):
while ($error && $error->isDuplicateIdError) try_again();
hits the database far too often and is assuredly bad practice. In very active threads this could potentially loop ten times with a busy DB. I've done tests before of this on live software for a project and it was a disaster, but it 'worked' and I got paid. Let's try to do better than just get paid and do a good job as well.
We cannot just use global IDs and we cannot just use IDs based on position in the thread (>>1, >>2 etc) due to familiarity reasons. We need to keep this hack from KX, without just devolving into a million post tables like Tinyboard/vichan/infinity stable. I will write a migration for it.
The text was updated successfully, but these errors were encountered:
Yup, I wrote a quick flooder by disabling CAPTCHA and CSRF token and then bombing it with posts from one hundred threads. I got up to 30 posts/second and no rejections/errors. Nice one.
Much to @jaw-sh's disapopintment, it is a definite requirement to have a board_id that autoincrements along with a global ID that auto increments.
Kusaba X, one of the original chan engine and the one that Tinyboard rewrote provides us with this schema:
Psql supports it as well. SQLite does with a CREATE TRIGGER. Unfortuantely, in MySQL in only one engine InnoDB this is impossible.
Looping forever like (psuedocode):
hits the database far too often and is assuredly bad practice. In very active threads this could potentially loop ten times with a busy DB. I've done tests before of this on live software for a project and it was a disaster, but it 'worked' and I got paid. Let's try to do better than just get paid and do a good job as well.
We cannot just use global IDs and we cannot just use IDs based on position in the thread (>>1, >>2 etc) due to familiarity reasons. We need to keep this hack from KX, without just devolving into a million post tables like Tinyboard/vichan/infinity stable. I will write a migration for it.
The text was updated successfully, but these errors were encountered: