@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Don't use handles in the Calendar event name migration

Summary:
Fixes T8209. Using handles can now cause cache fills as a side effect of T7707. Use a raw query instead.

I'll follow up on T8209 with some context and ideas for longer-term fixes.

Test Plan:
- Set event names to `''`.
- Reran migration with `--apply ... --trace`.
- Saw migration work correctly without executing cache fills.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8209

Differential Revision: https://secure.phabricator.com/D12858

+8 -3
+8 -3
resources/sql/autopatches/20150506.calendarunnamedevents.1.php
··· 11 11 if (strlen($event->getName()) == 0) { 12 12 echo "Renaming event {$id}...\n"; 13 13 $viewer = PhabricatorUser::getOmnipotentUser(); 14 - $handle = id(new PhabricatorHandleQuery()) 14 + 15 + // NOTE: This uses PeopleQuery directly, instead of HandleQuery, to avoid 16 + // performing cache fills as a side effect; the caches were added by a 17 + // later patch. See T8209. 18 + $user = id(new PhabricatorPeopleQuery()) 15 19 ->setViewer($viewer) 16 20 ->withPHIDs(array($event->getUserPHID())) 17 21 ->executeOne(); 18 - if ($handle->isComplete()) { 19 - $new_name = $handle->getName(); 22 + 23 + if ($user) { 24 + $new_name = $user->getUsername(); 20 25 } else { 21 26 $new_name = pht('Unnamed Event'); 22 27 }