1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-10 23:01:04 +01:00

Fix a straggling issue with cursor changes impacting Conpherence thread indexing

Summary: Ref T13266. Caught one more of these "directly setting afterID" issues in the logs.

Test Plan: Ran `bin/search index --type ConpherenceThread` before and after changes. Before: fatal about a direct call. After: clean index rebuild.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13266

Differential Revision: https://secure.phabricator.com/D20341
This commit is contained in:
epriestley 2019-03-28 16:14:47 -07:00
parent 15cc475cbd
commit f1a7eb66da

View file

@ -51,13 +51,16 @@ final class ConpherenceThreadIndexEngineExtension
ConpherenceThread $thread,
ConpherenceTransaction $xaction) {
$previous = id(new ConpherenceTransactionQuery())
$pager = id(new AphrontCursorPagerView())
->setPageSize(1)
->setAfterID($xaction->getID());
$previous_xactions = id(new ConpherenceTransactionQuery())
->setViewer($this->getViewer())
->withObjectPHIDs(array($thread->getPHID()))
->withTransactionTypes(array(PhabricatorTransactions::TYPE_COMMENT))
->setAfterID($xaction->getID())
->setLimit(1)
->executeOne();
->executeWithCursorPager($pager);
$previous = head($previous_xactions);
$index = id(new ConpherenceIndex())
->setThreadPHID($thread->getPHID())