Commit ab2053c
fix(controller): re-enqueue RD when child Resources change
The tiebreaker logic only fired on RD creation. When the controller
saw the RD before its child Resources existed (typical apply order:
RD, then Resource_a, then Resource_b), the count was 0 diskful → no
witness → done. Subsequent Resource creations didn't enqueue the RD,
so the 2-diskful trigger was missed and the witness never landed
until the next periodic re-sync.
Wire a `Watches(&Resource{}, EnqueueForRD)` so every Resource event
fans out to its parent RD's reconcile. Idempotent — running again on
an already-witnessed RD is a no-op.
Stand-side regression: tests/e2e/tiebreaker.sh failed before this fix,
passes after.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>1 parent 621d8b4 commit ab2053c
1 file changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
220 | 223 | | |
221 | 224 | | |
222 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
223 | 232 | | |
224 | 233 | | |
225 | 234 | | |
| 235 | + | |
| 236 | + | |
226 | 237 | | |
227 | 238 | | |
228 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
0 commit comments