@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.

Don't load attached files for profile images

Summary:
Ref T8478. I think the cycle is:

- Conpherence Thread > Loads handle for participant > loads file for profile image > loads attached files to check visibility > loads conpherence thread > ...

So, specifically, someone attached their profile image to a thread or message somewhere.

This breaks the cycle by stopping the attached-files visibility check from happening, since we don't need it. This seemed like the easiest link in the chain to break.

//Ideally//, I think the longer-term and more complete fix here is to stop Conpherence from requiring handles in order to load thread handles (and, generally, having a "handles must not load other handles" rule), but that's not trivial and might not be especially practical.

Test Plan: Will test in production.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8478

Differential Revision: https://secure.phabricator.com/D13216

+8
+8
src/applications/files/query/PhabricatorFileQuery.php
··· 142 142 foreach ($files as $file) { 143 143 $phids = array_keys($edges[$file->getPHID()][$edge_type]); 144 144 $file->attachObjectPHIDs($phids); 145 + 146 + if ($file->getIsProfileImage()) { 147 + // If this is a profile image, don't bother loading related files. 148 + // It will always be visible, and we can get into trouble if we try 149 + // to load objects and end up stuck in a cycle. See T8478. 150 + continue; 151 + } 152 + 145 153 foreach ($phids as $phid) { 146 154 $object_phids[$phid] = true; 147 155 }