Commit 3c5f3b6
committed
Fix Prepare() idempotency by preventing reverse state transition and atomically detecting already-prepared claims.
* Avoid overwriting PrepareCompleted with PrepareStarted on subsequent Prepare() calls.
* Move claim prepared state checks into a single updateCheckpoint call for atomicity.
* Ensure checkpoint state does not transition from completed to started state again.
Signed-off-by: Shiva Krishna, Merla <[email protected]>1 parent 11606fd commit 3c5f3b6
File tree
2 files changed
+40
-28
lines changed- cmd
- compute-domain-kubelet-plugin
- gpu-kubelet-plugin
2 files changed
+40
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 152 | + | |
| 153 | + | |
156 | 154 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
165 | 159 | | |
166 | | - | |
167 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
168 | 166 | | |
169 | 167 | | |
170 | 168 | | |
171 | 169 | | |
172 | 170 | | |
| 171 | + | |
173 | 172 | | |
174 | 173 | | |
175 | 174 | | |
176 | 175 | | |
177 | | - | |
178 | 176 | | |
179 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
180 | 186 | | |
181 | 187 | | |
182 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 153 | + | |
| 154 | + | |
157 | 155 | | |
158 | | - | |
159 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
160 | 167 | | |
161 | 168 | | |
162 | 169 | | |
| 170 | + | |
163 | 171 | | |
164 | 172 | | |
165 | 173 | | |
166 | 174 | | |
167 | | - | |
168 | 175 | | |
169 | | - | |
170 | | - | |
| 176 | + | |
171 | 177 | | |
172 | 178 | | |
173 | 179 | | |
174 | | - | |
175 | | - | |
| 180 | + | |
| 181 | + | |
176 | 182 | | |
177 | 183 | | |
178 | | - | |
| 184 | + | |
179 | 185 | | |
180 | 186 | | |
181 | 187 | | |
| |||
0 commit comments