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)
Sun, Apr 21, 3:49 PM
Unknown Object (File)
Sat, Apr 20, 10:51 AM
Unknown Object (File)
Sat, Apr 20, 2:13 AM
Unknown Object (File)
Fri, Apr 19, 5:30 PM
Unknown Object (File)
Wed, Apr 17, 2:45 PM
Unknown Object (File)
Tue, Apr 16, 6:52 PM
Unknown Object (File)
Thu, Apr 11, 7:05 AM
Unknown Object (File)
Mar 25 2024, 6:45 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
Branch
query1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 14189
Build 18437: Run Core Tests
Build 18436: arc lint + arc unit

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.