Page MenuHomePhabricator

When dirtying repository cluster routing caches after an Almanac edit, discover linked bindings from devices
ClosedPublic

Authored by epriestley on Jan 21 2019, 4:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 21, 3:43 PM
Unknown Object (File)
Fri, Apr 19, 4:37 AM
Unknown Object (File)
Fri, Apr 19, 1:59 AM
Unknown Object (File)
Wed, Apr 17, 2:33 PM
Unknown Object (File)
Mon, Apr 15, 5:27 AM
Unknown Object (File)
Thu, Apr 11, 6:58 AM
Unknown Object (File)
Mon, Apr 1, 1:08 PM
Unknown Object (File)
Mar 19 2024, 5:49 PM
Subscribers
None

Details

Summary

See PHI1030. When you edit an Almanac object, we attempt to discover all the related objects so we can dirty the repository cluster routing cache: if you modify a Device or Service that's part of a clustered repository, we need to blow away our cached view of the layout.

Currently, we don't correctly find linked Bindings when editing a Device, so we may miss Services which have keys that need to be disabled. Instead, discover these linked objects.

See D17000 for the original implementation and more context.

Test Plan
  • Used var_dump() to dump out the discovered objects and dirtied cache keys.
  • Before change: editing a Service dirties repository routing keys (this is correct), but editing a Device does not.
  • After change: editing a Device now correctly dirties repository routing keys.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

amckinley added inline comments.
src/applications/repository/storage/PhabricatorRepository.php
2175

This just forces the regeneration of all cache keys, right?

This revision is now accepted and ready to land.Jan 21 2019, 6:15 PM
src/applications/repository/storage/PhabricatorRepository.php
2175

Yeah. Some install might have updated a device before this patch and not had their cache dirty properly. It probably isn't causing any issues if they haven't noticed it, but this "fixes" that by dirtying everything so we don't have to remember that this is a phantom issue hanging around that might affect older installs.