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)
Sat, Dec 7, 12:02 PM
Unknown Object (File)
Thu, Dec 5, 12:17 PM
Unknown Object (File)
Sun, Dec 1, 6:58 AM
Unknown Object (File)
Nov 20 2024, 10:29 AM
Unknown Object (File)
Nov 15 2024, 7:59 PM
Unknown Object (File)
Nov 11 2024, 10:33 PM
Unknown Object (File)
Nov 8 2024, 7:06 AM
Unknown Object (File)
Oct 18 2024, 12:58 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
Branch
cache1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21616
Build 29467: Run Core Tests
Build 29466: arc lint + arc unit

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.