mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Conpherence - fix a fatal
Summary: Ref T7795. I can't get this to reproduce and its confusing to me how its possible. The trace in T7795 uses the "LOAD" pathway on the update controller. Under the hood, this issues a ThreadQuery with needTransactions to true. With needTransactions to true, the transactions and pertinent handles are all loaded nicely. So... best guess is there has been some LIMIT of transactions since the offending person participated...? Alternative fix which would probably work is to specify needParticipantCache to true. More on T7795 - the user report found the "a, b, c..." subtitle thing in the messages dropdown confusing. Yet another fix here would be to change that to be something like "a: snippet of what a said...". I'll discuss that on the task. Test Plan: iiam Reviewers: epriestley Reviewed By: epriestley Subscribers: nevogd, Korvin, epriestley Maniphest Tasks: T7795 Differential Revision: https://secure.phabricator.com/D12336
This commit is contained in:
parent
d44f05eead
commit
26f7b69ab2
2 changed files with 12 additions and 5 deletions
|
@ -10,6 +10,7 @@ final class ConpherenceUpdateController
|
||||||
return new Aphront404Response();
|
return new Aphront404Response();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$need_participants = false;
|
||||||
$needed_capabilities = array(PhabricatorPolicyCapability::CAN_VIEW);
|
$needed_capabilities = array(PhabricatorPolicyCapability::CAN_VIEW);
|
||||||
$action = $request->getStr('action', ConpherenceUpdateActions::METADATA);
|
$action = $request->getStr('action', ConpherenceUpdateActions::METADATA);
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
|
@ -26,12 +27,17 @@ final class ConpherenceUpdateController
|
||||||
case ConpherenceUpdateActions::JOIN_ROOM:
|
case ConpherenceUpdateActions::JOIN_ROOM:
|
||||||
$needed_capabilities[] = PhabricatorPolicyCapability::CAN_JOIN;
|
$needed_capabilities[] = PhabricatorPolicyCapability::CAN_JOIN;
|
||||||
break;
|
break;
|
||||||
|
case ConpherenceUpdateActions::NOTIFICATIONS:
|
||||||
|
$need_participants = true;
|
||||||
|
break;
|
||||||
|
case ConpherenceUpdateActions::LOAD:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
$conpherence = id(new ConpherenceThreadQuery())
|
$conpherence = id(new ConpherenceThreadQuery())
|
||||||
->setViewer($user)
|
->setViewer($user)
|
||||||
->withIDs(array($conpherence_id))
|
->withIDs(array($conpherence_id))
|
||||||
->needFilePHIDs(true)
|
->needFilePHIDs(true)
|
||||||
->needParticipantCache(true)
|
->needParticipants($need_participants)
|
||||||
->requireCapabilities($needed_capabilities)
|
->requireCapabilities($needed_capabilities)
|
||||||
->executeOne();
|
->executeOne();
|
||||||
|
|
||||||
|
@ -373,10 +379,9 @@ final class ConpherenceUpdateController
|
||||||
|
|
||||||
$need_widget_data = false;
|
$need_widget_data = false;
|
||||||
$need_transactions = false;
|
$need_transactions = false;
|
||||||
$need_participant_cache = false;
|
$need_participant_cache = true;
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
case ConpherenceUpdateActions::METADATA:
|
case ConpherenceUpdateActions::METADATA:
|
||||||
$need_participant_cache = true;
|
|
||||||
$need_transactions = true;
|
$need_transactions = true;
|
||||||
break;
|
break;
|
||||||
case ConpherenceUpdateActions::LOAD:
|
case ConpherenceUpdateActions::LOAD:
|
||||||
|
|
|
@ -97,7 +97,8 @@ final class ConpherenceThreadQuery
|
||||||
$this->loadParticipantsAndInitHandles($conpherences);
|
$this->loadParticipantsAndInitHandles($conpherences);
|
||||||
if ($this->needParticipantCache) {
|
if ($this->needParticipantCache) {
|
||||||
$this->loadCoreHandles($conpherences, 'getRecentParticipantPHIDs');
|
$this->loadCoreHandles($conpherences, 'getRecentParticipantPHIDs');
|
||||||
} else if ($this->needWidgetData) {
|
}
|
||||||
|
if ($this->needWidgetData) {
|
||||||
$this->loadCoreHandles($conpherences, 'getParticipantPHIDs');
|
$this->loadCoreHandles($conpherences, 'getParticipantPHIDs');
|
||||||
}
|
}
|
||||||
if ($this->needTransactions) {
|
if ($this->needTransactions) {
|
||||||
|
@ -244,7 +245,8 @@ final class ConpherenceThreadQuery
|
||||||
->execute();
|
->execute();
|
||||||
foreach ($handle_phids as $conpherence_phid => $phids) {
|
foreach ($handle_phids as $conpherence_phid => $phids) {
|
||||||
$conpherence = $conpherences[$conpherence_phid];
|
$conpherence = $conpherences[$conpherence_phid];
|
||||||
$conpherence->attachHandles(array_select_keys($handles, $phids));
|
$conpherence->attachHandles(
|
||||||
|
$conpherence->getHandles() + array_select_keys($handles, $phids));
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue