Differential D21526 Diff 51233 src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php
| Show First 20 Lines • Show All 312 Lines • ▼ Show 20 Lines | public function synchronizeWorkingCopyBeforeWrite() { | ||||
| $write_lock->useSpecificConnection($locked_connection); | $write_lock->useSpecificConnection($locked_connection); | ||||
| $this->logLine( | $this->logLine( | ||||
| pht( | pht( | ||||
| 'Acquiring write lock for repository "%s"...', | 'Acquiring write lock for repository "%s"...', | ||||
| $repository->getDisplayName())); | $repository->getDisplayName())); | ||||
| // See T13590. On the HTTP pathway, it's possible for us to hit the script | |||||
| // time limit while holding the durable write lock if a user makes a big | |||||
| // push. Remove the time limit before we acquire the durable lock. | |||||
| set_time_limit(0); | |||||
| $lock_wait = phutil_units('2 minutes in seconds'); | $lock_wait = phutil_units('2 minutes in seconds'); | ||||
| try { | try { | ||||
| $write_wait_start = microtime(true); | $write_wait_start = microtime(true); | ||||
| $start = PhabricatorTime::getNow(); | $start = PhabricatorTime::getNow(); | ||||
| $step_wait = 1; | $step_wait = 1; | ||||
| while (true) { | while (true) { | ||||
| ▲ Show 20 Lines • Show All 555 Lines • Show Last 20 Lines | |||||