@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make HandlePool resistant to reentrant calls

Conpherence thread handles need to load other handles in order to load. Currently, HandlePool can loop when reentered. Instead, clear the on-deck list before querying so that reentering it will query for only new handles, not reissue queries for in-flight handles.

Auditors: btrahan

+7 -2
+7 -2
src/applications/phid/handle/pool/PhabricatorHandlePool.php
··· 61 61 62 62 // If we need any handles, bulk load everything in the queue. 63 63 if ($need) { 64 + // Clear the list of PHIDs that need to be loaded before performing the 65 + // actual fetch. This prevents us from looping if we need to reenter the 66 + // HandlePool while loading handles. 67 + $fetch_phids = array_keys($this->unloadedPHIDs); 68 + $this->unloadedPHIDs = array(); 69 + 64 70 $handles = id(new PhabricatorHandleQuery()) 65 71 ->setViewer($this->getViewer()) 66 - ->withPHIDs(array_keys($this->unloadedPHIDs)) 72 + ->withPHIDs($fetch_phids) 67 73 ->execute(); 68 74 $this->handles += $handles; 69 - $this->unloadedPHIDs = array(); 70 75 } 71 76 72 77 return array_select_keys($this->handles, $phids);