Automatically adjust branch mirror frequency based on commit frequency

Bug #136939 reported by Jonathan Lange
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

Currently, Launchpad mirrors branches at a fixed time interval. It might be desirable to adjust the frequency of mirroring based on the frequency of commits.

From a phone conversation w/ mpt. Related to bug 74033.

Thoughts:
- Ideally, we'd only pull when the branch-being-mirrored has been changed.
- This isn't the same as commits to the branch. Is there a better measure?

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Your goal is to maximize the usefulness of the mirrors, which includes minimizing the average time between a branch changing and that change being mirrored. So I suggest first devising a way to measure that average time. Then you can adjust the mirror scheduling algorithm and test the effects of your adjustments.

Revision history for this message
David Allouche (ddaa) wrote :

The problem is that there is no way to know that a branch is being changed without looking at it. As Jonathan says "[changes to the branch] isn't the same as commits to the branch." Typically commits happens locally on the developer's workstation and are then pushed to the public location.

So there is no way to measure "the average time between a branch changing and that change being mirrored" because the act of detecting changes is the act of mirroring. At most, we could use a statistical model of update times...

I can imagine two approaches to improve the system:

 1. The user has a plugin that notifies Launchpad when pushing to the public location, mirroring can be done immediately. That is limited by requiring active cooperation from the owner of the mirrored branch, but I believe that would satisfy a genuine use case: "I do not want to host my code on Launchpad, but I want to benefit from Launchpad's added value." It is not clear how much of a use case this is really.

 2. When mirroring finds changes, the mirroring interval for the branch is automatically decreased. When mirroring finds no change, the mirroring interval is automatically increased. (Handwaving about the amount by which the interval should be increased and decreased).

Revision history for this message
Tim Penhey (thumper) wrote :

Once we have the appropriate API hooks, it should be relatively simple to create a launchpad plugin command for bzr to do "bzr mirror-now" or something.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Marking as low importance. But it could even be Wont Fix in favour of going for the api-based solution...

Changed in launchpad-bazaar:
importance: Undecided → Low
Jonathan Lange (jml)
Changed in launchpad-bazaar:
status: New → Triaged
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.