Cached karma should be recalculated after merging an account

Bug #3189 reported by Christian Reis
24
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Unassigned

Bug Description

We recently saw in bug 2569 that a merged account was listed with tons of karma. Salgado and I looked into this today and discovered the root cause: when merging the person's karma records are transferred, but the cached karma is not recalculated. This needs to be done at merge time.

Related branches

Changed in launchpad:
assignee: nobody → salgado
status: New → Accepted
Changed in launchpad:
status: Accepted → Fixed
Revision history for this message
Guilherme Salgado (salgado) wrote :

The fix for this bug was merged into rocketfuel on 2005-10-19, with "Recalculate the karma cache upon merging of accounts and some other fixes. r=BjornT" as the commit message. The patch is found on revision 2716 of our bzr tree. I don't know what happened later, but this fix, together with the tests got reverted somehow.

Changed in launchpad:
assignee: salgado → nobody
status: Fix Released → Confirmed
Revision history for this message
Stuart Bishop (stub) wrote : Re: [Bug 3189] Re: Cached karma should be recalculated after merging an account

Guilherme Salgado wrote:
> The fix for this bug was merged into rocketfuel on 2005-10-19, with
> "Recalculate the karma cache upon merging of accounts and some other
> fixes. r=BjornT" as the commit message. The patch is found on revision
> 2716 of our bzr tree. I don't know what happened later, but this fix,
> together with the tests got reverted somehow.

I probably destroyed it when refactoring the karma caches.

This should be minor to fix. Enough people have been shocked by this that it
is worth fixing, even though nothing is actually lost and the karma
corrected during the next daily batch update. It will involve granting the
launchpad database user rights to update the karma cache tables.

--
Stuart Bishop <email address hidden> http://www.canonical.com/
Canonical Ltd. http://www.ubuntu.com/

Curtis Hovey (sinzui)
affects: launchpad-foundations → launchpad-registry
Changed in launchpad-registry:
importance: Medium → Low
Curtis Hovey (sinzui)
tags: added: merge-deactivate
Revision history for this message
Curtis Hovey (sinzui) wrote :

We have decided to delete the karma caches on since they are regenerated, but we are merging the karma total so that the user does not think he has lost karma.

Changed in launchpad-registry:
assignee: nobody → Curtis Hovey (sinzui)
status: Triaged → In Progress
Curtis Hovey (sinzui)
Changed in launchpad-registry:
milestone: none → 10.11
Curtis Hovey (sinzui)
tags: added: qa-ok
Curtis Hovey (sinzui)
Changed in launchpad-registry:
status: In Progress → Fix Committed
Revision history for this message
Anne Gentle (annegentle) wrote :

I also saw this bug this morning while merging two accounts, the Karma: field shows zero. I can wait for it to regenerate in the morning, no problem, but someone suggested that I report it since I observed it. :)

Revision history for this message
Curtis Hovey (sinzui) wrote :

It does take about a day. The karma was not lost, it is just not in the UI yet. We will release the fix in a few days so that automatically updates the UI. This fix will also use the oldest membership date.

Curtis Hovey (sinzui)
Changed in launchpad-registry:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui)
Changed in launchpad:
assignee: Curtis Hovey (sinzui) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.