Commit 5cdb9e1
Ensure that pending events in BuildEventStreamer are resolved in FIFO order.
1. `TestAttempt` events would wait for the `TargetCompleteEvent` to be posted before being posted.
2. There was an implicit requirement for the `TestAttempt` events to be posted in a specific order.
3. This didn't break in the noskymeld case because we fulfilled this ordering by using the order of performing the attempts themselves. The sequence would look like:
+ post `TargetCompleteEvent`
-> perform attempt #1
-> post `TestAttempt` #1
-> perform attempt #2
-> post `TestAttempt` #2
4. With skymeld, however, it could happen like this:
+ defer `TargetCompleteEvent` to wait for `CoverageActionFinishedEvent`
+ perform attempt #1 -> defer posting `TestAttempt` #1 & wait for `TargetCompleteEvent`
+ perform attempt #2 -> defer posting `TestAttempt` #2 & wait for `TargetCompleteEvent`
+ `CoverageActionFinishedEvent` -> release & post `TargetCompleteEvent`
+ `TargetCompleteEvent` -> release & post `TestAttempt` #2
+ `TargetCompleteEvent` -> release & post `TestAttempt` #1
Due to (2), the undefined ordering in (4) would cause an issue.
This CL fixes that by ensuring a FIFO ordering of the deferred events.
PiperOrigin-RevId: 572165337
Change-Id: Iac4d023d946865b8b81f15b119417192dc4b5c531 parent 66ac39c commit 5cdb9e1
File tree
1 file changed
+12
-9
lines changed- src/main/java/com/google/devtools/build/lib/runtime
1 file changed
+12
-9
lines changedLines changed: 12 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | | - | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
109 | 112 | | |
110 | | - | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| |||
493 | 496 | | |
494 | 497 | | |
495 | 498 | | |
496 | | - | |
| 499 | + | |
497 | 500 | | |
498 | | - | |
| 501 | + | |
499 | 502 | | |
500 | | - | |
| 503 | + | |
501 | 504 | | |
502 | 505 | | |
503 | 506 | | |
| |||
558 | 561 | | |
559 | 562 | | |
560 | 563 | | |
561 | | - | |
| 564 | + | |
562 | 565 | | |
563 | | - | |
| 566 | + | |
564 | 567 | | |
565 | 568 | | |
566 | 569 | | |
567 | 570 | | |
568 | | - | |
| 571 | + | |
569 | 572 | | |
570 | 573 | | |
571 | 574 | | |
| |||
0 commit comments