I was hacking on wakaba sources lately, and one thing caught my attention.
Wakaba seems to update HTML files without synchronisation of any kind. Using temporary files wards of corrupted files, but it seems that at least 'page cache' can be out-of-date if two posts happen simultaneously -- two instances build temporary files and one, which updated database first, updates pages last -- one comment is lost.
Or am I just missing something?
No, that's definitely the case. However, on a board that's active enough that such a simultaneous update has any real chance of occurring, another update will happen soon enough that I don't think there's any real incentive to add extra code to work around this. Unless you have a quick and simple fix for it.
a quick and simple fix, yes?
# in post_stuff()
# after "# proxy check"
$dbh->do("LOCK TABLES ".SQL_TABLE." WRITE");
# before "# set the name, email and password cookies"
$dbh->do("UNLOCK TABLES");
N.B. the implications of this code: all posts are serialized, which means some requests will take a very long time to execute, tying up a mysql connection slot all the while.