Page MenuHomePhabricator

Read materialized project members instead of real members
ClosedPublic

Authored by epriestley on Dec 27 2015, 12:42 PM.
Tags
None
Referenced Files
F11404986: D14893.diff
Thu, Dec 1, 8:07 PM
Unknown Object (File)
Tue, Nov 29, 8:06 PM
Unknown Object (File)
Tue, Nov 29, 8:06 PM
Unknown Object (File)
Tue, Nov 29, 8:06 PM
Unknown Object (File)
Wed, Nov 16, 6:53 AM
Unknown Object (File)
Sat, Nov 12, 6:58 PM
Unknown Object (File)
Sat, Nov 12, 5:04 AM
Unknown Object (File)
Fri, Nov 11, 10:06 PM
Subscribers
None

Details

Summary

Ref T10010. This will allow us to find superprojects with withMemberPHIDs(...) queries.

  • Copy all the current real member edges to materialized member edges.
  • Redirect all reads to look at materialized members.
  • This table is already kept in sync by earlier work with indexing.

Basically, flow is:

  • Writes (joining, leaving, adding/removing members) write to the real member edge type.
  • After a project's members change, they're copied to the materialized member edge type for that project and all of its superprojects.
  • Reads look at materialized members, so "Parent" sees the members of "Child" and "Grandchild" as its own members, but we still have the "real members" edge type to keep track of "natural" or "direct" members.
Test Plan
  • Ran migration.
  • Ran unit tests.
  • Saw the same projects as projects I was a member of.
  • Added some var_dump() stuff to verify the Owners changed.
  • Used grep to look for other readers of this edge type.
  • Made some project updates.

Diff Detail

Repository
rP Phabricator
Branch
sub6
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 9813
Build 11809: Run Core Tests
Build 11808: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Read materialized project members instead of real members.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Dec 27 2015, 3:07 PM
This revision was automatically updated to reflect the committed changes.