Author Topic: Errors in "Thank you" counts?  (Read 1594 times)

Bo-ama

  • Explicit-Users
  • Hero Member
  • *
  • Thank You
  • -Given: 157
  • -Receive: 397
  • Posts: 519
Errors in "Thank you" counts?
« on: April 02, 2019, 08:17:50 pm »
Hi mods... not a great problem, but something I observed which might imply more serious aspects (database?)... I've noticed several times that "Thank You" counts on user profiles (given/received) are highly inaccurate. As an example, user Newzea (484) shows 97 thanks received for his 8 posts. After viewing those posts I see he was thanked 1 time. I was not able to verify the "thanks given" count, but that also seemed a bit high at 157. Please understand that I use Newzea ONLY as an example; and NOTHING specific to that user or their behavior. I have seen this occur for other users as well.

One clue might be that I usually see these errors in profiles of "newbie" users. Considering that Newzea's ID is as low as 484, it sounds as if older ID numbers are being re-used for new members. If that is the case, it's possible that old data from the previous ID-holder is making it thru to the new profile (ie., counts not reset in re-used rows where the ID already exists).

Just an observation... thx.
Edit: it looks like Newzea was registered in 4/2009, so perhaps the ID isn't so low after all... and perhaps thank-yous were given in deleted posts... in which case, never mind and sorry...
« Last Edit: April 02, 2019, 08:33:51 pm by Bo-ama »
Sanity is the most widely accepted form of madness; consciousness the most widely shared dream.
(Avatar: SaRenna Lee, perfection's ambassadress)

Indy

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 1291
  • -Receive: 11322
  • Posts: 4486
Re: Errors in "Thank you" counts?
« Reply #1 on: April 02, 2019, 09:13:10 pm »
Thanks for the keen observations.
You were right however, let me explain: 'thanks' are an addon to the forum framework. Which means that the core forum software itself isn't really aware of the 'thanks'. The thanks are stored on each post, and in a counter on the user. So when a thank-you is given, the post gets a thank-you with a 'userId' added to that post, so it can link to that person. Next to that, the user that receives the thank you gets his thank-yous incremented by 1.
If the forum core removes a post, it never removes the thank-yous, nor does it reduce the amount of thank-yous.
The same happens when we remove a user from our forum, it removes all of his posts, but all the thank-yous remain.

There is an option for us to re-calculate everyone's amount of thank-yous, by looking at the thank-yous of every post, and iterate through that. We've just never done that, dunno how long that will take.
I'll have a talk with kwuk about it.

Regardless, thanks for the observation, it's nice to know how people feel about the whole forum and if we can improve it.
I want something good to die for, to make it beautiful to live.

Bo-ama

  • Explicit-Users
  • Hero Member
  • *
  • Thank You
  • -Given: 157
  • -Receive: 397
  • Posts: 519
Re: Errors in "Thank you" counts?
« Reply #2 on: April 03, 2019, 04:35:23 pm »
"Thank you" (LOL) for The reply, that all makes perfect sense. I ddidn't want to seem as if I was "bothered" by thank-yous not being earned; it was just a concern about the internals, and your explanation is great. It doesn't really seem worth doing a lot of extra coding to correct the data, and since the counts accurately reflect the other users' appreciation at the time of their reading, regardless of future deletions, I think the counts are justified and explainable as is.  8)
Sanity is the most widely accepted form of madness; consciousness the most widely shared dream.
(Avatar: SaRenna Lee, perfection's ambassadress)

Tags: