It is currently Thu Dec 14, 2017 10:54 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Problem with database listing on 2017-03-19 14:50
PostPosted: Mon Mar 20, 2017 8:07 pm 
Offline
User avatar

Joined: Sat Feb 04, 2006 9:19 am
Posts: 2158
webfork alerted me to a problem yesterday whereby some old entries were surfacing in the front pages of the default listing.

After some investigation, I have nailed down to 80 entries being affected. There's a field called "display_order" in the database which is updated everytime the entry version string is changed (and the interval between this change and the last is >= 7 days). This field determines the order an entry appears in the listing.

For the affected 80 entries, all of them had their "display_order" changed to '2017-03-19 14:50:01'. This is very strange because another entry called "ver_updated", which is typically changed in tandom with "display_order", is not affected at all.

I have reverted all 80 entries from the db backup. So far, I have not been able to find out what's wrong from either the code or the web server log.

I am posting this for historical reference so that if ever we encounter this again, we can come back to this post.

I will keep trying to look through the code and try to identify any possible bug that might have caused this issue.


Top
 Profile  
 
 Post subject: Re: Problem with database listing on 2017-03-19 14:50
PostPosted: Mon Mar 20, 2017 10:19 pm 
Offline
User avatar

Joined: Sat Jul 31, 2010 1:19 am
Posts: 1719
Location: Helsinki, Finland
This isn't even the first time when the glitch has occurred: https://www.portablefreeware.com/forums/viewtopic.php?p=76137#p76137

It affected 78 entries last time. It looks like, whatever the bug is, when it does occur it hits about 80 entries. :|

_________________
My YouTube channel | Release date of my 11th playlist: January 26, 2018


Top
 Profile  
 
 Post subject: Re: Problem with database listing on 2017-03-19 14:50
PostPosted: Tue Mar 21, 2017 1:56 am 
Offline
User avatar

Joined: Sat Feb 04, 2006 9:19 am
Posts: 2158
Thanks SYSTEM! So webfork was right that it happened about 2 years back, but I couldn't find the topic because it was buried in the "New designs for TPFC by tproli" thread.

Since the problem has recurred, I think it's good we have a dedicated topic for it. After re-reading the messages in 2015, I am surprised the symptoms and analysis are the same. I suspect this is caused by some kind of unidentified, rare, race condition in the code somewhere.

I need to think about how to deal with this, at the very least, put in additional logs so that if it occurs again, we have more info to work on next time.

If you guys have any idea or suggestions, do lemme know. Thanks!


Top
 Profile  
 
 Post subject: Re: Problem with database listing on 2017-03-19 14:50
PostPosted: Tue Mar 21, 2017 2:37 am 
Offline
User avatar

Joined: Sat Feb 04, 2006 9:19 am
Posts: 2158
I have added additional checks to the database maintenance script to guard against more than one instance of the script being run at the same time.

Previously, it was assumed that the maintenance script will finish within the allotted 5 mins. If the system is under heavy load, this might not be the case, and another instance of the script might be spawned, leading to unforeseen behaviour.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group