Page MenuHomePhabricator

Make repository daemons periodically check for out-of-sync repositories
ClosedPublic

Authored by epriestley on Thu, Jan 31, 8:19 PM.

Details

Summary

See PHI1015. If you add new repository nodes to a cluster, we may not actually sync some repositories for up to 6 hours (if they've had no commits for 30 days).

Add an explicit check for out-of-sync repositories to trigger background sync.

Test Plan
  • Ran bin/phd debug pullocal.
  • Fiddled with the repository_workingcopy version table to put the local node in and out of sync with the cluster.
  • Saw appropriate responses in the daemon (sync; wait if the last sync trigger was too recent).

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Thu, Jan 31, 8:19 PM
epriestley requested review of this revision.Thu, Jan 31, 8:20 PM
epriestley added inline comments.Thu, Jan 31, 9:41 PM
src/applications/repository/management/PhabricatorRepositoryManagementWorkflow.php
10

This is a fix for PHP 7.3+ complaining about count(null) when you run bin/repository update with no arguments.

amckinley accepted this revision.Fri, Feb 1, 4:27 AM
This revision is now accepted and ready to land.Fri, Feb 1, 4:27 AM
This revision was automatically updated to reflect the committed changes.