Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Paste
P24
T15642
Active
Public
Actions
Authored by
aklapper
on Nov 1 2023, 22:24.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Tags
None
Referenced Files
F386582: T15642
Nov 1 2023, 22:24
2023-11-01 22:24:16 (UTC+0)
Subscribers
None
diff --git a/src/applications/feed/query/PhabricatorFeedTransactionQuery.php b/src/applications/feed/query/PhabricatorFeedTransactionQuery.php
index d0a9f53e35..42ee332c1c 100644
--- a/src/applications/feed/query/PhabricatorFeedTransactionQuery.php
+++ b/src/applications/feed/query/PhabricatorFeedTransactionQuery.php
@@ -155,6 +155,20 @@ final class PhabricatorFeedTransactionQuery
->setAncestorClass('PhabricatorApplicationTransactionQuery')
->execute();
+ // Remove TransactionQuery classes that belong to previously installed apps
+ // which got uninstalled in the meantime: Increases query performance and
+ // decreases likeliness that a "Query Overheated" error will be displayed.
+ // See https://secure.phabricator.com/T13133, https://we.phorge.it/T15642
+ foreach ($queries as $key => $query) {
+ if (method_exists($query, 'getApplicationClassName')) {
+ $application_class_name = $query->getApplicationClassName();
+ $application = new $application_class_name();
+ if (!$application->isInstalled()) {
+ unset($queries[$key]);
+ }
+ }
+ }
+
$type_map = array();
// If we're querying for specific transaction PHIDs, we only need to
diff --git a/src/applications/maniphest/query/ManiphestTransactionQuery.php b/src/applications/maniphest/query/ManiphestTransactionQuery.php
index 9826107b77..49efe36a20 100644
--- a/src/applications/maniphest/query/ManiphestTransactionQuery.php
+++ b/src/applications/maniphest/query/ManiphestTransactionQuery.php
@@ -7,4 +7,8 @@ final class ManiphestTransactionQuery
return new ManiphestTransaction();
}
+ public function getApplicationClassName() {
+ return 'PhabricatorManiphestApplication';
+ }
+
}
Event Timeline
aklapper
created this paste.
Nov 1 2023, 22:24
2023-11-01 22:24:16 (UTC+0)
aklapper
created this object in space
S1 Public
.
aklapper
created this object with edit policy "
Trusted Contributors
(Project)".
aklapper
mentioned this in
T15642: Feed Transaction Logs: Exception: Query overheated: examined more than 1,010 raw rows without finding 101 visible objects.
.
Log In to Comment