Code review comment for lp://staging/~doanac/ubuntu-ci-services-itself/ppa-assigner-design

Revision history for this message
Andy Doan (doanac) wrote :

On 11/20/2013 10:38 AM, Francis Ginther wrote:
> 1) low cost tickets only need 1 PPA. Can this be changed to only hand out 1 PPA at a time (If 2 are needed, 2 calls can be made)?

Good point. I've changed the API to just be "ppa" and not ppa_pair
oriented. This should make code cleaner and better in the future if we
ever need >2 PPA's for a ticket.

> 2) is lockname essentially the ticket owning the PPA (or map to it)? I would assume that if the process owning the PPA were to die before releasing it, we would be able to clean up or reuse the same PPA if that process was restarted (yes this gets tricky when considering 1) )

Its a bit of a hack, but I thought it made give us insight as to who
owned a lock. I'm wondering in the future if "locked" type objects in
our system might include something like a "ticket-id". Since we don't
have that concept, I thought this might help.

> 3) it would be a good optimization to clean PPAs on populate and release_ppa_pair, that way there is no cleaning delay when getting a PPA.

I've added verbage about making the PPA cleaning optional.

Design should be updated now.

« Back to merge proposal