PDA

View Full Version : New page bug



Flabbicus
2006-07-20, 09:52 PM
I've been noticing a bug with the first post of a new page of a thread recently.

What happens is that it doesn't show up until the next poster makes a reply.

I was wondering if this is a new thing because I only noticed it happening a few days ago, and it seems to be only happening in Silly Message Board Games.

Any comments?

Rawhide
2006-07-20, 10:39 PM
Rather than reinvent the wheel, I will quote what RawBearNYC had to say a while back when he tried to explain what was happening.


I haven't looked into it, but my guess is that a race condition exists.

at the 14th post, two people start posting.

Person A hits post and Yabb sees that the current post count is 14.

Person B hits post and Yabb sees that the current post count is 14 (because the steps below haven't occurred yet).

Person A's post process writes the post entry. Then updates the thread header with a post count of 15 (14 plus one new one).

Person B's post process writes the post entry. Then updates the thread header with a post count of 15 (becasue it retreived a 14 before Person A's process had a chance to change it).

Now the thread has 16 posts (which would require a new page). But the header file only says 15 (so , no new page logic is executed).

This is just a guess. I haven't really spent any time looking at this issue, but it's consistent with the way YaBB works. I've seen other race conditions occur in this software, so I'm not terribly surprised.

Flabbicus
2006-07-21, 08:15 AM
Thanks Rawhide.

Sorry, I was away when he made that post and didn't notice it until a day or two ago.

LostInBrittany
2006-07-24, 09:33 AM
It seems to happen often in threads where several people post usually at the same time, like the Stabbity Death threads...

Shhalahr Windrider
2006-07-24, 11:19 AM
It seems to happen often in threads where several people post usually at the same time, like the Stabbity Death threads...
That would lend evidence to RawBear's race condition hypothesis.