Timeouts declining team invitation

Bug #193220 reported by Barry Warsaw
4
Affects Status Importance Assigned to Milestone
Launchpad itself
High
Guilherme Salgado

Bug Description

See OOPS-780EB59

Joey inviting mailing-list-beta-testers to coloradoteam, however really the inverse is necessary to provide coloradoteam a mailing list. So I went to ~mailing-list-beta-testers/+invitations/coloradoteam added a reviewer comment and hit Decline. It appears to timeout every time.

Revision history for this message
Barry Warsaw (barry) wrote :

This is blocking me from managing mailing list requests.

Changed in launchpad:
importance: Undecided → Critical
milestone: none → 1.2.2
Revision history for this message
Guilherme Salgado (salgado) wrote :

As we can see in the OOPS, we timeout because a few queries are repeated almost 400 times each. These queries are issued by IPerson.getSubTeams() and IPerson.getSuperTeams(), which are called by _cleanTeamParticipation(), which is, in turn, called by ITeamMembership.setStatus().

Since the act of declining a membership invitation is not actually deactivating an active membership we shouldn't need to call _cleanTeamParticipation(), so that'd be one way to avoid the timeouts.

We'd still need to find out why the methods are being called so many times, though.

Changed in launchpad:
status: New → Confirmed
Revision history for this message
Guilherme Salgado (salgado) wrote :

Since we're kicking one team from another team, the code goes through all direct/indirect members of the team being kicked and tries to delete the TeamParticipation for that member on the super team. As we can see, the mailing-list-beta-testers team has 745 active members, which means our code will iterate through all of them attempting to delete the TP entries (if necessary), timing out after a few hundred iterations. :/

Changed in launchpad:
assignee: nobody → salgado
Changed in launchpad:
status: Confirmed → In Progress
Revision history for this message
Guilherme Salgado (salgado) wrote :

decreased importance and retargeted to 1.2.3 as having this on edge will provide a reasonable workaround for whoever experiences this.

Changed in launchpad:
importance: Critical → High
milestone: 1.2.2 → 1.2.3
Revision history for this message
Guilherme Salgado (salgado) wrote :

landed on mainline r5775

Changed in launchpad:
status: In Progress → Fix Committed
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers