Page MenuHomePhabricator

Retain repository update cooldowns across daemon restarts
ClosedPublic

Authored by epriestley on Sep 19 2016, 11:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 8:42 AM
Unknown Object (File)
Tue, Apr 2, 6:19 AM
Unknown Object (File)
Tue, Apr 2, 2:38 AM
Unknown Object (File)
Sat, Mar 30, 5:04 AM
Unknown Object (File)
Sat, Mar 30, 12:39 AM
Unknown Object (File)
Sat, Mar 30, 12:35 AM
Unknown Object (File)
Fri, Mar 29, 8:14 PM
Unknown Object (File)
Fri, Mar 29, 8:03 PM
Subscribers
None

Details

Summary

Ref T11665. Fixes T7865. When we restart the daemons, the repository pull daemon currently resets the cooldowns on all of its pulls. This can generate a burst of initial load when restarting a lot of instance daemons (as in the Phacility cluster), described in T7865. This smooths things out so that recent pulls are considered, and any repositories which were waiting keep waiting.

Somewhat counterintuitively, hosted repositories write TYPE_FETCH status messages, so this should work equally well for hosted and observed repositories.

This also paves the way for better backoff behavior on repository errors, described in T11665. The error backoff now uses the same logic that the standard backoff does. The next change will make backoff computation consider recent errors.

(This is technically too large for repositories which have encountered one error and have a low commit rate, but I'll fix that in the following change; this is just a checkpoint on the way there.)

Test Plan

Ran bin/phd debug pull, saw the daemon compute reasonable windows based on previous pull activity.

Diff Detail

Repository
rP Phabricator
Branch
daemon1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 13773
Build 17792: Run Core Tests
Build 17791: arc lint + arc unit