mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 14:52:40 +01:00
Impose a HardpointEngine future parallelism limit
Summary: Ref T13546. If we try to resolve several hundred hardpoint queries which execute subprocesses, we can currently hit system limits. For now, limit resolution to 32 simultaneous futures. In the future, this should switch to `FuturePool` and possibly become more nuanced. Test Plan: In a future change, ran `arc land --into-empty ...` to land thousands of commits. Before change, got a "proc_open()" error when launching too many simultaneous subprocesses. After change, this "worked". Maniphest Tasks: T13546 Differential Revision: https://secure.phabricator.com/D21307
This commit is contained in:
parent
7378e2baad
commit
fc3974ed70
1 changed files with 2 additions and 1 deletions
|
@ -192,7 +192,8 @@ final class ArcanistHardpointEngine
|
||||||
$wait_futures = $this->waitFutures;
|
$wait_futures = $this->waitFutures;
|
||||||
if ($wait_futures) {
|
if ($wait_futures) {
|
||||||
if (!$this->futureIterator) {
|
if (!$this->futureIterator) {
|
||||||
$iterator = new FutureIterator(array());
|
$iterator = id(new FutureIterator(array()))
|
||||||
|
->limit(32);
|
||||||
foreach ($wait_futures as $wait_future) {
|
foreach ($wait_futures as $wait_future) {
|
||||||
$iterator->addFuture($wait_future);
|
$iterator->addFuture($wait_future);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue