- Notifications
You must be signed in to change notification settings - Fork923
Commit50ff06c
authored
chore: acquire lock for individual workspace transition (#15859)
When Coder is ran in High Availability mode, each Coder instance has alifecycle executor. These lifecycle executors are all trying to do thesame work, and whilst transactions saves us from this causing an issue,we are still doing extra work that could be prevented.This PR adds a `TryAcquireLock` call for each attempted workspacetransition, meaning two Coder instances shouldn't duplicate effort.1 parentd504e0e commit50ff06c
File tree
2 files changed
+82
-1
lines changed- coderd/autobuild
2 files changed
+82
-1
lines changedLines changed: 11 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| 6 | + | |
6 | 7 |
| |
7 | 8 |
| |
8 | 9 |
| |
| |||
177 | 178 |
| |
178 | 179 |
| |
179 | 180 |
| |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
180 | 190 |
| |
181 | 191 |
| |
182 | 192 |
| |
| |||
389 | 399 |
| |
390 | 400 |
| |
391 | 401 |
| |
392 |
| - | |
| 402 | + | |
393 | 403 |
| |
394 | 404 |
| |
395 | 405 |
| |
|
Lines changed: 71 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
21 | 22 |
| |
22 | 23 |
| |
23 | 24 |
| |
| |||
72 | 73 |
| |
73 | 74 |
| |
74 | 75 |
| |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
75 | 146 |
| |
76 | 147 |
| |
77 | 148 |
| |
|
0 commit comments
Comments
(0)