Warning - Read Tracking is being cleared Nov 2, 2003

  • PluTunium
  • Professor
  • Professor
  • User avatar
  • Posts: 812
  • Loc: Touring the USA

Post 3+ Months Ago

Well, Hopefully the board is performs better!
  • PluTunium
  • Professor
  • Professor
  • User avatar
  • Posts: 812
  • Loc: Touring the USA

Post 3+ Months Ago

OK, it does! That post was REALLY quick. It's not slow anymore!
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9099
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Yup everything seems much faster now :)
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23454
  • Loc: Woodbridge VA

Post 3+ Months Ago

Tremendous improvement! I was a little concerned earlier when I kept getting database connection errors, but this was an excellent move. //*Breathes in the fresh air.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9099
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Sorry guys, I had to clear read history again without warning. The pruning feature didn't work too great.
  • Cuerock
  • Expert
  • Expert
  • Cuerock
  • Posts: 540
  • Loc: My cubical

Post 3+ Months Ago

No problem. I know that logged in this morning and i had about 40 nad didnt really have time to read them....... Came back and was like WOW i only have 5 WOOWHOO! :D
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9099
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Sorry again guys, read tracking had to be cleared again :(
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23454
  • Loc: Woodbridge VA

Post 3+ Months Ago

Figured that as soon as I came back to the board and all was blank. *lol
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

Heheh nah you read everthing, don't you remember?!
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9099
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Yeah, figures haha. I tried the read_history pruning script again today, and the same thing happened. All data in the read history table was lost. At first I thought the bug was due to the table getting too big, but I just tried it again on barely any data in the table and the same thing happened, all data was lost in the table. So now I am working on debugging the pruning script to figure out what the problem is. Hopefully we won't lose any more read tracking after this.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23454
  • Loc: Woodbridge VA

Post 3+ Months Ago

Look for "null" -- sounds to me like the portion of the script that executes the query is updating all fields to null Should be pretty easy to spot.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9099
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Nope just found the bug. The bug is here:

Code: [ Select ]
  // Convert the days param into seconds
  // Subtract the number of days from the current day to get a epoch
  // date to prune before
  //
  $time_to_prune = $current_time - ($day_to_prune * 86400);
  1.   // Convert the days param into seconds
  2.   // Subtract the number of days from the current day to get a epoch
  3.   // date to prune before
  4.   //
  5.   $time_to_prune = $current_time - ($day_to_prune * 86400);


That code looks fine, however the problem is that $day_to_prune is turning up to be 0. In the admin area I select how many days old a post has to be to prune it from it read history. I just tested it by putting 31 in the admin area and it isn't getting passed for some reason. So the problem happened because the last two times it was pruning everything older than 0 days! No wonder it wipes everything.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9099
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Here was the fix:

Code: [ Select ]
  // Convert the days param into seconds
  // Subtract the number of days from the current day to get a epoch
  // date to prune before
  //
  $time_to_prune = $current_time - ($days_to_prune * 86400);
  1.   // Convert the days param into seconds
  2.   // Subtract the number of days from the current day to get a epoch
  3.   // date to prune before
  4.   //
  5.   $time_to_prune = $current_time - ($days_to_prune * 86400);


Whoever wrote that script used $day_to_prune when it should have been $days_to_prune. Small mistake, huge problem. Problem now resolved.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23454
  • Loc: Woodbridge VA

Post 3+ Months Ago

*lol shows the impotance of attention to detail -- just that one little "s" caused all that problem! Good job!
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23454
  • Loc: Woodbridge VA

Post 3+ Months Ago

Of course using spell check works too -- I can't believe I just typed that last post like that. *lol impotance=importance
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6375
  • Loc: twitter.com/unflux

Post 3+ Months Ago

makes sense both ways ;)

Post Information

  • Total Posts in this topic: 46 posts
  • 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
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.