FlyerTalk Forums - View Single Post - Flyertalk can't seem to remember last viewed post
Old Jun 28, 2011 | 6:50 pm
  #75  
IB-Dick
 
Join Date: Feb 2009
Posts: 959
ftnoob's post is accurate, and I'd like to offer my thanks for writing it.

Just to add a little complexity to this, I want to make a note on how the system marks what you've read. Every time you view a thread, it marks in the database the timestamp of the last post on the page that you looked at. If you look at page 2 of a thread that has 4 pages, then it assumes that you've finished page 2 and will next time direct you to page 3. If you land on page 5 of a thread with 5 pages, but page 5 only has 2 posts on that page, when you return you will return to the third post of page 5 and update the record in the database with the new appropriate value. While this isn't always completely accurate, it does the best job that it can, and it's the most accurate method that the software offers to get users to the correct new post.

Now, if you think about a table that records every viewed thread by a logged in user, you might thing "Wow, that table has to be HUGE." Well, you'd be half-correct there. Since that data model isn't exactly scalable, the forum software makes some assumptions. The biggest assumption is that after a certain period of time, you've read every thread. This configurable setting was previously set to 10 days, but has since been changed to 5 days for an experiment. A scheduled task runs through the table where we keep track of the last read threads and removes all records for that are past that 5 day limit. When you open a thread, it assumes that any post that was made over 5 days ago was read. It checks the table to see if there is a record in there for the specified thread and if so, it directs you to where it assumes you left off. If there isn't a record in there, then it assumes that the first unread post is first post made since 5 days ago.

I can test this by going to a long thread that I've never been to. In this example, I'll use this thread:
http://www.flyertalk.com/forum/commu...-new-post.html
Notice that this is the 'magic' url to use ftnoob's term. Since I've never been to this thread, the first unread post would be post 1 on page 1. That's not the case, because it assumes that every post made before 5 days ago I've already had ample time to read. Instead, I get directed to here, http://www.flyertalk.com/forum/commu...l#post16627511 the 7th post on page 35. I got the 7th post because it's the earliest post in the 5 day window, since the previous post was made on the 22nd (6 days ago). Now, here's the tricky part... I just view the thread and was directed to the 7th post on page 35. I didn't read the full page, but the software doesn't know that. When I go to that magic link again, it assumes that I've read page 35, so it redirects me to last post of the page. If there had been a page 36, it would have directed me to the top of page 36. If then I went to the 'magic' url again, it would redirect me to page 37, you know... if there was one in this example. I should have picked a better one. Feel free to give this a shot yourself... Go to a forum that you don't usually frequent, find a 100 page thread that was started over 5 days ago but still has recent posts, and click on the last unread post button. You'll end up on the last post from 432,000 seconds ago (5 days ago). When you return to the magic -new-post.html page, you'll be semi-intelligently and predictably moved along the thread.

I've walked through the system a number of times since this was reported, and I haven't been able to find any flaws in the system mechanics. Is it funky in the way it works, making incorrect assumptions about what you have viewed and what you haven't? Yup. Can it drop you off, seemingly in the middle of nowhere, and make the system look horribly broken? Yup. Is there a better way? Not really.

We're continuing to replicate the problem. At first glace, it looks like the system is terribly broken. Upon further inspection and understanding of how the system is designed to work, we can't find anything that isn't functioning as designed. Since there is some chance that it's a matter of database scaling (which I don't believe), we turned the threshold for remembering posts from 10 to 5. If the problem is with the database not properly marking data or redirects not being sent accurately, this should help (since we've cut the database size literally in half). If the problem is that the software offers a confusing user experience, this will make it worse. The good news is that if this setting makes things worse, then we at least have a way to make things better. Instead of marking the threads read after 5 days (current setting) or 10 days (old setting), we can try setting this to 15 days and see if things are less confusing.


Originally Posted by ftnoob
[1] Original virtual URL
[2] Incorrect redirect experienced on FF 5
[3] Correct redirect experienced on FF 4
This isn't completely accurate. When you pasted the 'magic' url into FF 5, the database was updated to show that you've progressed along the thread. When you pasted the 'magic' url into FF 4, you got a later post because of the newly updated record in the db. If you had done these in reverse order, it would look like FF 4 is incorrect and FF 5 was broken.

Originally Posted by ftnoob
By setting the posts-per-page to 40 we reduce the number of mult-page threads as well as the number of times we end up on a page that is before or ofter the one that actually contains our first unread post.
Kinda. I can also exacerbate the problem, since now if I read the first 20 post of a thread and not the whole page, when I return it can dump me on page 2, causing me to miss 20 posts.
IB-Dick is offline