Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php
| Show First 20 Lines • Show All 227 Lines • ▼ Show 20 Lines | final public function execute() { | ||||
| $this->willExecute(); | $this->willExecute(); | ||||
| // If we examine and filter significantly more objects than the query | // If we examine and filter significantly more objects than the query | ||||
| // limit, we stop early. This prevents us from looping through a huge | // limit, we stop early. This prevents us from looping through a huge | ||||
| // number of records when the viewer can see few or none of them. See | // number of records when the viewer can see few or none of them. See | ||||
| // T11773 for some discussion. | // T11773 for some discussion. | ||||
| $this->isOverheated = false; | $this->isOverheated = false; | ||||
| $overheat_limit = $limit * 10; | |||||
| // See T13386. If we on an old offset-based paging workflow, we need | |||||
| // to base the overheating limit on both the offset and limit. | |||||
| $overheat_limit = $need * 10; | |||||
| $total_seen = 0; | $total_seen = 0; | ||||
| do { | do { | ||||
| if ($need) { | if ($need) { | ||||
| $this->rawResultLimit = min($need - $count, 1024); | $this->rawResultLimit = min($need - $count, 1024); | ||||
| } else { | } else { | ||||
| $this->rawResultLimit = 0; | $this->rawResultLimit = 0; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 537 Lines • Show Last 20 Lines | |||||