From 4b2a447003be5582932a509f228c14f91cf30f55 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 19 May 2020 13:52:14 -0700 Subject: [PATCH] Allow "has draft inlines?" queries to overheat Summary: Ref T13513. If your 10 most recently authored inlines have all been deleted, these queries can fail by overheating. This is silly and probably rarely happens outside of development. For now, just let them overheat. This may create a false negative (incorrect "no draft" signal when the real condition is "drafts, but 10 most recent comments were deleted"). This could be sorted out later with a query mode like "executeAny()", perhaps. Test Plan: - Created and deleted 10 inlines. - Submitted comments. - Before: overheating fatal during draft flag generation. - After: clean submission. Maniphest Tasks: T13513 Differential Revision: https://secure.phabricator.com/D21274 --- .../differential/engine/DifferentialRevisionDraftEngine.php | 1 + src/applications/diffusion/engine/DiffusionCommitDraftEngine.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/applications/differential/engine/DifferentialRevisionDraftEngine.php b/src/applications/differential/engine/DifferentialRevisionDraftEngine.php index 22b103c525..da45f5bc82 100644 --- a/src/applications/differential/engine/DifferentialRevisionDraftEngine.php +++ b/src/applications/differential/engine/DifferentialRevisionDraftEngine.php @@ -11,6 +11,7 @@ final class DifferentialRevisionDraftEngine ->setViewer($viewer) ->withRevisionPHIDs(array($revision->getPHID())) ->withPublishableComments(true) + ->setReturnPartialResultsOnOverheat(true) ->setLimit(1) ->execute(); diff --git a/src/applications/diffusion/engine/DiffusionCommitDraftEngine.php b/src/applications/diffusion/engine/DiffusionCommitDraftEngine.php index 8837dbe63f..e5d45f315b 100644 --- a/src/applications/diffusion/engine/DiffusionCommitDraftEngine.php +++ b/src/applications/diffusion/engine/DiffusionCommitDraftEngine.php @@ -11,6 +11,7 @@ final class DiffusionCommitDraftEngine ->setViewer($viewer) ->withCommitPHIDs(array($commit->getPHID())) ->withPublishableComments(true) + ->setReturnPartialResultsOnOverheat(true) ->setLimit(1) ->execute();