Comment 3 for bug 568114

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.