Page MenuHomePhabricator

Fix an issue where PullLocal daemon could spin in an error loop
ClosedPublic

Authored by epriestley on Feb 17 2015, 11:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 3, 7:17 AM
Unknown Object (File)
Thu, Apr 25, 1:27 AM
Unknown Object (File)
Sat, Apr 20, 2:13 AM
Unknown Object (File)
Fri, Apr 12, 5:53 PM
Unknown Object (File)
Tue, Apr 9, 4:39 AM
Unknown Object (File)
Mar 11 2024, 10:34 PM
Unknown Object (File)
Feb 25 2024, 7:06 AM
Unknown Object (File)
Feb 7 2024, 6:59 AM
Subscribers

Details

Summary

Fixes T7106. If you have bad credentials AND you've pushed an "update this repository" message into the queue, the loop above this level ends up resetting the timer every time we go through it, so the daemon spins in a loop failing forever.

Test Plan
  • Created a repo with bad credentials.
  • Clicekd "updated now" to queue an update message.
  • Saw daemon run in a loop.
  • Applied patch, no loop.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Fix an issue where PullLocal daemon could spin in an error loop.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Feb 17 2015, 11:17 PM
src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php
78–93

Specifically, here, we'd re-read the same message and then reset the timer in $retry_after.

This has one possibly-negative effect: clicking "update" 50 times on a repository that's failing won't actually make it update immediately 50 times. So if you resolve the issue, you have to wait 15 seconds for it to fix itself. But that basically seems fine to me.

This revision was automatically updated to reflect the committed changes.