aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/skyframe/GraphInconsistencyReceiver.java
Commit message (Collapse)AuthorAge
* Native Skyframe support for node restartingGravatar mschaller2018-07-01
| | | | | | | | | | | | Useful for attempting to recover relationships between Skyframe graph state and external systems, when the evaluation of a Skyframe node has the side effect of creating that relationship. Currently, only supported in graph evaluations when reverse dependency edges are not tracked. RELNOTES: None. PiperOrigin-RevId: 202892953
* Restart node building if previous dep is dirty, fix check-then-act racesGravatar mschaller2018-07-01
| | | | | | | | | | | | | | | | | | | | | | While initializing the SkyFunctionEnvironment for a node being built, if a previously requested dep is found to be not done, reset and re-enqueue the building node. This lets the node handle the not-done dep like any other not-done dep (e.g. by enqueuing it or by waiting to be signalled by it). Similarly, while registering newly requested deps when building a node yields a value or an error, if a newly requested dep is found to be not done, return without completing the node, so that it may be signalled by the dep (without crashing; done nodes cannot be signalled). Also fixes a handful of remaining check-then-act races during Skyframe evaluation that were vulnerable to done->dirty node transitions. (Note that done->dirty node transitions during evaluation are planned, but not yet possible.) RELNOTES: None. PiperOrigin-RevId: 202886360
* Potentially allow children of a dirty node to be missing from the graph. ↵Gravatar janakr2018-05-15
| | | | | | Also pass the GraphInconsistencyReciever into SkyframeExecutor as a parameter. PiperOrigin-RevId: 196716642
* Allow SkyFunctions to return a sentinel value indicating that all of a ↵Gravatar janakr2018-04-30
node's in-progress data should be forgotten, and its evaluation should be restarted from scratch, as if it were freshly created/dirtied. To guard against this happening unexpectedly, any such events are passed to a GraphInconsistencyReceiver, which can verify that the SkyFunction is behaving properly. This is the first change in a series to permit action rewinding when it is discovered that a previously generated input file is no longer available. When an action detects that one of its inputs is unusable, it can return this sentinel value, causing it to be re-evaluated from scratch. Follow-up changes will make the node corresponding to the input, and the node corresponding to the action that generated the input, dirty when this happens, causing the upstream action to be re-run, regenerating the desired input. Currently works for builds that do not keep edges, although follow-ups may make this possible for all builds. PiperOrigin-RevId: 194863097