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, Mar 26, 6:31 PM
Unknown Object (File)
Sun, Mar 24, 6:15 AM
Unknown Object (File)
Fri, Mar 22, 7:20 AM
Unknown Object (File)
Feb 16 2024, 4:06 PM
Unknown Object (File)
Feb 7 2024, 4:56 PM
Unknown Object (File)
Feb 7 2024, 4:56 PM
Unknown Object (File)
Feb 7 2024, 4:56 PM
Unknown Object (File)
Feb 7 2024, 3:13 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable