Page MenuHomePhabricator

Read materialized project members instead of real members

Authored by epriestley on Dec 27 2015, 12:42 PM.
Referenced Files
F11146836: D14893.diff
Sat, Sep 24, 11:29 AM
F11144602: D14893.diff
Fri, Sep 23, 8:32 PM
Unknown Object (File)
Fri, Sep 16, 8:17 PM
Unknown Object (File)
Sat, Sep 3, 3:38 AM
Unknown Object (File)
Aug 16 2022, 1:21 AM
Unknown Object (File)
Aug 14 2022, 10:48 AM
Unknown Object (File)
Aug 8 2022, 6:06 PM
Unknown Object (File)
Aug 3 2022, 1:53 PM



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

rP Phabricator
Lint Not Applicable
Tests Not Applicable

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.