Simple Machines Community Forum

General Community => Site Comments, Issues and Concerns => Topic started by: efk on September 01, 2017, 05:20:35 PM

Title: SMF fail?
Post by: efk on September 01, 2017, 05:20:35 PM
See attachment and discuss - https://www.simplemachines.org/community/index.php?topic=555957.0
Title: Re: SMF fail?
Post by: Arantor on September 01, 2017, 05:32:14 PM
This is called a race condition and is a natural part of computing science.
Title: Re: SMF fail?
Post by: efk on September 01, 2017, 05:39:25 PM
So my post was 1st but his post is a winner. Btw I've used "Preview" and there was red message about new post just before my post and only post was his post so he posted at least 15 seconds before I did. In other words maybe I used Preview in the same time he posted so forum read Preview as 1st and counted/exchanged time like that.
Title: Re: SMF fail?
Post by: Arantor on September 01, 2017, 06:01:07 PM
Nope, that's not what happened.

It's a race condition, nothing more.
Title: Re: SMF fail?
Post by: Biology Forums on September 01, 2017, 06:45:55 PM
Quote from: Arantor on September 01, 2017, 06:01:07 PM
Nope, that's not what happened.

It's a race condition, nothing more.

What in the world is that?
Title: Re: SMF fail?
Post by: d3vcho on September 01, 2017, 07:11:00 PM
Quote from: Study Force on September 01, 2017, 06:45:55 PM
Quote from: Arantor on September 01, 2017, 06:01:07 PM
Nope, that's not what happened.

It's a race condition, nothing more.

What in the world is that?

Google is your friend ;)

https://stackoverflow.com/questions/34510/what-is-a-race-condition
Title: Re: SMF fail?
Post by: SleePy on September 03, 2017, 11:08:21 AM
This should be corrected. Its not a SMF fail, but servers configuration issue.
Title: Re: SMF fail?
Post by: efk on September 03, 2017, 12:19:20 PM
Quote from: efk on September 01, 2017, 05:39:25 PM
So my post was 1st but his post is a winner. Btw I've used "Preview" and there was red message about new post just before my post and only post was his post so he posted at least 15 seconds before I did. In other words maybe I used Preview in the same time he posted so forum read Preview as 1st and counted/exchanged time like that.
Quote from: Arantor on September 01, 2017, 06:01:07 PM
Nope, that's not what happened.

It's a race condition, nothing more.
https://stackoverflow.com/questions/34510/what-is-a-race-condition

This answer about "check and act" (marked as useful for 746 users) in some way confirms my theory how there is a chance that when I used "Preview" button, other member at the same time used "Post" button so I believe how that is the reason for placing his post after mine. I used Preview about 20 seconds before posting, so that must to have connection in this case. When any of these buttons is used, there is usually about a 1 second before post becomes visible in preview or public.
Also this is 2nd or 3rd time that I saw this to happen, of course previously on another forum.
Title: Re: SMF fail?
Post by: Arantor on September 03, 2017, 12:27:42 PM
Or not.

There are multiple servers that host this forum. They have different times set on them, and it is the server's time that is stored in the database. If one server is set to being 30 seconds ahead of the other, this can happen.

But I guess a former SMF dev and the current site manager of this site know less about PHP and servers than you do...