Commit c3847e6
committed
fix(webapp): lock the variable row in every env var writer
Creating values for an existing variable and editing a single value did
not lock the variable row before touching value rows, so a concurrent
delete could still form a lock cycle with them. Both now lock the
variable row up front, the same way edit and the delete paths do, and
the lock helper's docblock is the single statement of that order.
Also makes the concurrent parent-delete test deterministic by starting
the bulk delete only after the competing delete has run.1 parent 9e943ea commit c3847e6
2 files changed
Lines changed: 23 additions & 7 deletions
File tree
- apps/webapp
- app/v3/environmentVariables
- test
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
314 | 315 | | |
315 | 316 | | |
316 | 317 | | |
| 318 | + | |
| 319 | + | |
317 | 320 | | |
318 | 321 | | |
319 | 322 | | |
| |||
631 | 634 | | |
632 | 635 | | |
633 | 636 | | |
| 637 | + | |
| 638 | + | |
634 | 639 | | |
635 | 640 | | |
636 | 641 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1131 | 1131 | | |
1132 | 1132 | | |
1133 | 1133 | | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
1134 | 1138 | | |
1135 | 1139 | | |
| 1140 | + | |
1136 | 1141 | | |
1137 | 1142 | | |
| 1143 | + | |
| 1144 | + | |
1138 | 1145 | | |
1139 | 1146 | | |
1140 | 1147 | | |
1141 | 1148 | | |
1142 | 1149 | | |
1143 | | - | |
1144 | | - | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
1145 | 1156 | | |
1146 | 1157 | | |
1147 | 1158 | | |
| |||
0 commit comments