mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-11 07:11: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:
parent
15cc475cbd
commit
f1a7eb66da
1 changed files with 7 additions and 4 deletions
|
@ -51,13 +51,16 @@ final class ConpherenceThreadIndexEngineExtension
|
||||||
ConpherenceThread $thread,
|
ConpherenceThread $thread,
|
||||||
ConpherenceTransaction $xaction) {
|
ConpherenceTransaction $xaction) {
|
||||||
|
|
||||||
$previous = id(new ConpherenceTransactionQuery())
|
$pager = id(new AphrontCursorPagerView())
|
||||||
|
->setPageSize(1)
|
||||||
|
->setAfterID($xaction->getID());
|
||||||
|
|
||||||
|
$previous_xactions = id(new ConpherenceTransactionQuery())
|
||||||
->setViewer($this->getViewer())
|
->setViewer($this->getViewer())
|
||||||
->withObjectPHIDs(array($thread->getPHID()))
|
->withObjectPHIDs(array($thread->getPHID()))
|
||||||
->withTransactionTypes(array(PhabricatorTransactions::TYPE_COMMENT))
|
->withTransactionTypes(array(PhabricatorTransactions::TYPE_COMMENT))
|
||||||
->setAfterID($xaction->getID())
|
->executeWithCursorPager($pager);
|
||||||
->setLimit(1)
|
$previous = head($previous_xactions);
|
||||||
->executeOne();
|
|
||||||
|
|
||||||
$index = id(new ConpherenceIndex())
|
$index = id(new ConpherenceIndex())
|
||||||
->setThreadPHID($thread->getPHID())
|
->setThreadPHID($thread->getPHID())
|
||||||
|
|
Loading…
Reference in a new issue