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
Unknown Object (File)
Sat, Dec 7, 6:11 AM
Unknown Object (File)
Sun, Dec 1, 7:27 PM
Unknown Object (File)
Sun, Dec 1, 7:27 PM
Unknown Object (File)
Sun, Dec 1, 7:27 PM
Unknown Object (File)
Sun, Dec 1, 7:26 PM
Unknown Object (File)
Wed, Nov 20, 3:16 AM
Unknown Object (File)
Nov 16 2024, 11:07 AM
Unknown Object (File)
Nov 12 2024, 2:12 AM
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
Lint
Lint Not Applicable
Unit
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.