User appears twice on +mailing-list-subscribers

Bug #568114 reported by Francis J. Lacoste
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Curtis Hovey

Bug Description

If you visit https://edge.launchpad.net/~kicad-developers/+mailing-list-subscribers, you'll see that there are two Alain Portal subscribers and that they both point to the same URL.

There are indeed two subscribers named Alain portal, but one is ~alain-portal and the other one is ~alain-portal-univ-montp2.

There must be some bad caching going on somewhere

Related branches

Changed in launchpad-registry:
assignee: nobody → Edwin Grubbs (edwin-grubbs)
status: New → Triaged
Curtis Hovey (sinzui)
Changed in launchpad-registry:
assignee: Edwin Grubbs (edwin-grubbs) → nobody
importance: Undecided → Low
Revision history for this message
Curtis Hovey (sinzui) wrote :

The code is calling the person formatter for each person in mailing_list.getSubscribers(). I think the issue is in getSubscribers() which does this
    results.order_by(Person.displayname)

I believe storm is doing this. I suspect adding
    results.order_by(Person.displayname, Person.id)

tags: added: mailing-lists
Revision history for this message
Curtis Hovey (sinzui) wrote :

Note that I beleive Alain portal is geting only one email from the list now. This fix will ensure he gets two.

tags: added: trivial
Changed in launchpad-registry:
milestone: none → series-future
Curtis Hovey (sinzui)
tags: added: merge-deactivate
removed: trivial
summary: - Two different persons have the same URL on +mailing-list-subscribers
+ Merged user appears twice on +mailing-list-subscribers
Curtis Hovey (sinzui)
tags: removed: merge-deactivate
Revision history for this message
Curtis Hovey (sinzui) wrote : Re: Merged user appears twice on +mailing-list-subscribers

This is not trivial, this is not about merging, and it is not about caching. In fact, the problem is cause indirectly by not caching.

The table layout is abusing the batch navigator, asking for items by index, causing a query for each user using the getSubscribers() query as the base, adding an offset and a limit. Since the getSubscribers intends to return a all users, sorted by display, asking for offset 1, limit 1 and offset 2, limit 2 are working with a pair of results, not one, and the table builder, expecting only one, always uses the first one!

Adding the proposed Person.id fixes the issue. Using Person.name is clearer. But the queries on the page remain outrageous. The table could create a list of the users in the batch before it starts getting items by index so that a single query for the user is needed.

Curtis Hovey (sinzui)
Changed in launchpad-registry:
milestone: series-future → 10.09
status: Triaged → In Progress
summary: - Merged user appears twice on +mailing-list-subscribers
+ User appears twice on +mailing-list-subscribers
Curtis Hovey (sinzui)
Changed in launchpad-registry:
assignee: nobody → Curtis Hovey (sinzui)
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
tags: added: qa-needstesting
Changed in launchpad-registry:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui)
Changed in launchpad-registry:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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