1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 01:02:42 +01:00
No description
Find a file
epriestley 1089a48d4a Allow edges to be configured to prevent cycles
Summary:
Certain types of things we should be storing in edges (notably, Task X depends on Task Y) should always be acyclic. Allow `PhabricatorEdgeEditor` to enforce this, since we can't correctly enforce it outside of the editor without being vulnerable to races.

Each edge type can be marked acyclic. If an edge type is acyclic, we perform additional steps when writing new edges of that type:

  - We acquire a global lock on the edge type before performing any reads or writes. This ensures we can't produce a cycle as a result of a race where two edits add edges which independently do not produce a cycle, but do produce a cycle when combined.
  - After performing writes but before committing transactions, we load the edge graph for each acyclic type and verify that it is, in fact, acyclic. If we detect cycles, we abort the edit.
  - When we're done, we release the edge type locks.

This is a relatively high-complexity change, but gives us a simple way to flag an edge type as acyclic in a robust way.

Test Plan: Ran unit tests.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1162

Differential Revision: https://secure.phabricator.com/D2940
2012-07-09 10:39:38 -07:00
bin Introduce "bin/repository" for repository management 2012-06-25 12:35:37 -07:00
conf Allow configuration of the default monospaced font style 2012-07-06 15:39:43 -07:00
externals Update Javelin 2012-06-08 16:16:41 -07:00
resources Add a generic object for unit tests 2012-07-09 10:39:14 -07:00
scripts Add an example event listener, improve documentation, and add a commit discovery event 2012-07-03 16:46:27 -07:00
src Allow edges to be configured to prevent cycles 2012-07-09 10:39:38 -07:00
support/aphlict Add an Aphlict CLI client 2012-07-05 16:04:04 -07:00
webroot Allow configuration of the default monospaced font style 2012-07-06 15:39:43 -07:00
.arcconfig Add a custom lint name hook to Phabricator 2011-08-31 13:49:30 -07:00
.divinerconfig Fix line links to source codes of generated documentation 2012-04-10 11:31:52 -07:00
.gitignore Allow specifying custom celerity resource map 2012-06-04 18:45:03 -07:00
.gitmodules Just change the location. 2011-05-28 15:14:54 -07:00
README Add a roadmap document and update the README. 2011-06-29 09:38:03 -07:00

Phabricator is a open source collection of web applications which make it easier
to write, review, and share source code. Phabricator was developed at Facebook.

This is an early release. It's pretty high-quality and usable, but under
active development so things may change quickly.

You can learn more about the project and find links to documentation and
resources at: http://phabricator.org/

LICENSE

Phabricator is released under the Apache 2.0 license except as otherwise noted.
http://www.apache.org/licenses/LICENSE-2.0