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
Unknown Object (File)
Mon, Mar 25, 6:45 AM
Unknown Object (File)
Mon, Mar 18, 8:37 PM
Unknown Object (File)
Tue, Mar 12, 1:41 AM
Unknown Object (File)
Feb 19 2024, 5:45 PM
Unknown Object (File)
Feb 19 2024, 2:01 PM
Unknown Object (File)
Feb 19 2024, 2:01 PM
Unknown Object (File)
Feb 19 2024, 2:00 PM
Unknown Object (File)
Feb 19 2024, 2:00 PM
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.