Page MenuHomePhabricator

Make query engines "overheat" instead of stalling when filtering too many results
ClosedPublic

Authored by epriestley on Oct 20 2016, 3:36 PM.
Tags
None
Referenced Files
F14017118: D16735.id40296.diff
Mon, Nov 4, 2:21 PM
F14012292: D16735.diff
Fri, Nov 1, 10:44 AM
F14012259: D16735.id40295.diff
Fri, Nov 1, 10:10 AM
F13972837: D16735.diff
Oct 17 2024, 9:28 PM
Unknown Object (File)
Oct 13 2024, 2:41 PM
Unknown Object (File)
Oct 11 2024, 8:32 PM
Unknown Object (File)
Oct 9 2024, 5:55 AM
Unknown Object (File)
Oct 5 2024, 1:12 AM
Subscribers
None

Details

Summary

Ref T11773. This is an initial first step toward a more complete solution, but should make the worst case much less bad: prior to this change, the worst case was "30 second exeuction timeout". After this patch, the worst case is "no results + explanatory message", which is strictly better.

Test Plan

Made all feed stories fail policy checks, loaded home page.

  • Before adding overheating: 9,600 queries / 20 seconds
  • After adding overheating: 376 queries / 800ms

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Make query engines "overheat" instead of stalling when filtering too many results.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Oct 20 2016, 3:53 PM
epriestley edited edge metadata.

For clarity, only enforce the overheat limit if the query has a limit.

We can't currently reach the check without a limit, but this is a little easier to read and future-proofs us against reorganization of this code.

This revision was automatically updated to reflect the committed changes.