Commit 6fa519d
Make non-convergence errors respect the write lock
Summary:
When iterative SCC solving exceeds MAX_ITERATIONS, non-convergence
diagnostics were emitted before commit arbitration. Since multiple threads
can independently solve the same SCC, each contender could emit the same
diagnostics to the shared ErrorCollector, causing nondeterministic
duplicate errors.
This change makes non-convergence diagnostics follow the same winner
selection as answers:
- Thread write-unlock/commit plumbing now returns whether a write actually
won (did_write / did_commit).
- iterative_resolve_scc snapshots non-convergent members, commits final
answers, and emits non-convergence diagnostics only if this thread won
commit.
- Cross-module write-unlock now also returns did_write for consistent
winner tracking.
This preserves first-write-wins behavior, eliminates duplicate loser-
thread diagnostics, and keeps diagnostics authoritative to the committed
SCC result.
Reviewed By: rchen152
Differential Revision: D95402450
fbshipit-source-id: e3caf70e6bfb7d75a29aa08c02b5b70095cff6491 parent b5a9746 commit 6fa519d
3 files changed
Lines changed: 65 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
573 | | - | |
| 573 | + | |
| 574 | + | |
574 | 575 | | |
575 | 576 | | |
576 | 577 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2694 | 2694 | | |
2695 | 2695 | | |
2696 | 2696 | | |
2697 | | - | |
| 2697 | + | |
2698 | 2698 | | |
2699 | 2699 | | |
2700 | 2700 | | |
2701 | 2701 | | |
2702 | 2702 | | |
2703 | 2703 | | |
2704 | | - | |
| 2704 | + | |
2705 | 2705 | | |
2706 | 2706 | | |
2707 | 2707 | | |
| |||
2711 | 2711 | | |
2712 | 2712 | | |
2713 | 2713 | | |
2714 | | - | |
| 2714 | + | |
| 2715 | + | |
2715 | 2716 | | |
2716 | 2717 | | |
2717 | 2718 | | |
| |||
2729 | 2730 | | |
2730 | 2731 | | |
2731 | 2732 | | |
| 2733 | + | |
2732 | 2734 | | |
2733 | 2735 | | |
2734 | 2736 | | |
| |||
2834 | 2836 | | |
2835 | 2837 | | |
2836 | 2838 | | |
2837 | | - | |
| 2839 | + | |
2838 | 2840 | | |
2839 | 2841 | | |
2840 | 2842 | | |
| |||
2876 | 2878 | | |
2877 | 2879 | | |
2878 | 2880 | | |
| 2881 | + | |
2879 | 2882 | | |
2880 | 2883 | | |
2881 | | - | |
| 2884 | + | |
2882 | 2885 | | |
2883 | 2886 | | |
2884 | 2887 | | |
| 2888 | + | |
2885 | 2889 | | |
2886 | 2890 | | |
2887 | 2891 | | |
| |||
3094 | 3098 | | |
3095 | 3099 | | |
3096 | 3100 | | |
3097 | | - | |
3098 | | - | |
3099 | | - | |
3100 | | - | |
3101 | | - | |
3102 | | - | |
3103 | | - | |
3104 | | - | |
3105 | | - | |
3106 | | - | |
3107 | | - | |
3108 | | - | |
3109 | | - | |
3110 | | - | |
3111 | | - | |
3112 | | - | |
3113 | | - | |
3114 | | - | |
3115 | | - | |
3116 | | - | |
3117 | | - | |
3118 | | - | |
3119 | | - | |
3120 | | - | |
3121 | | - | |
3122 | | - | |
3123 | | - | |
3124 | | - | |
3125 | | - | |
3126 | | - | |
3127 | | - | |
3128 | | - | |
3129 | | - | |
3130 | | - | |
3131 | | - | |
3132 | | - | |
3133 | | - | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
| 3104 | + | |
| 3105 | + | |
| 3106 | + | |
| 3107 | + | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
| 3111 | + | |
| 3112 | + | |
| 3113 | + | |
| 3114 | + | |
| 3115 | + | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + | |
| 3119 | + | |
| 3120 | + | |
| 3121 | + | |
| 3122 | + | |
| 3123 | + | |
| 3124 | + | |
| 3125 | + | |
| 3126 | + | |
| 3127 | + | |
| 3128 | + | |
| 3129 | + | |
| 3130 | + | |
| 3131 | + | |
| 3132 | + | |
| 3133 | + | |
| 3134 | + | |
| 3135 | + | |
| 3136 | + | |
| 3137 | + | |
| 3138 | + | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
| 3150 | + | |
| 3151 | + | |
3134 | 3152 | | |
3135 | 3153 | | |
3136 | 3154 | | |
3137 | | - | |
3138 | | - | |
3139 | 3155 | | |
3140 | 3156 | | |
3141 | 3157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2498 | 2498 | | |
2499 | 2499 | | |
2500 | 2500 | | |
2501 | | - | |
| 2501 | + | |
2502 | 2502 | | |
2503 | 2503 | | |
2504 | | - | |
| 2504 | + | |
2505 | 2505 | | |
2506 | 2506 | | |
2507 | 2507 | | |
| |||
2510 | 2510 | | |
2511 | 2511 | | |
2512 | 2512 | | |
| 2513 | + | |
2513 | 2514 | | |
2514 | 2515 | | |
2515 | 2516 | | |
| |||
0 commit comments