Page MenuHomePhabricator

When the "FeedQuery" on user profile pages overheats, the event is not contained to the reactor core
Closed, ResolvedPublic


See When a user profile page feed query overheats, it takes the whole page down with it. This is mostly-anticipated fallout from D20294.

Event Timeline

epriestley triaged this task as Low priority.Jul 23 2019, 10:47 PM
epriestley created this task.

To reproduce this easily:

  • Force every query to overheat, e.g. with the patch below.
  • Load any user profile page.
diff --git a/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php b/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php
index 8780584f94..d7d973b983 100644
--- a/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php
+++ b/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php
@@ -332,7 +332,7 @@ abstract class PhabricatorPolicyAwareQuery extends PhabricatorOffsetPagedQuery {
       if (!$this->disableOverheating) {
-        if ($overheat_limit && ($total_seen >= $overheat_limit)) {
+        if ($overheat_limit && ($total_seen >= $overheat_limit) || true) {
           $this->isOverheated = true;
           if (!$this->returnPartialResultsOnOverheat) {

The "natural" reproduction case is something like:

  • As Alice, push 1,100 commits to repository X.
  • As Bailey, set the visibility for repository X to "Only Bailey".
  • As any user except Bailey, view Alice's profile.

A more exciting alternate version fo "set the visibility of repository X..." might be "destroy repository X". Currently, we do not have a DestructionEngineExtension for destroying feed stories when an object is destroyed. This is perhaps worth building, but something of an edge case, and the table is GC'd anyway.

See downstream for a similar issue on project pages.