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
F14053634: D11795.diff
Fri, Nov 15, 5:59 PM
F14043681: D11795.diff
Tue, Nov 12, 12:08 PM
F14042433: D11795.diff
Tue, Nov 12, 3:31 AM
F14028388: D11795.diff
Fri, Nov 8, 1:05 PM
F14017750: D11795.diff
Mon, Nov 4, 10:29 PM
F14014726: D11795.id28433.diff
Sun, Nov 3, 6:54 AM
F14007681: D11795.diff
Tue, Oct 29, 10:00 AM
F14003132: D11795.id.diff
Sat, Oct 26, 2:40 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.