Commit 30a4ed9
committed
qmanager: split remove to separate pending
problem: The "remove" method was used for both handling the `free` and
`cancel` RPCs. Under some code paths, remove de-allocates resources, so
using it for a pending cancellation, even if it seems to be protected by
checks, is unnecessarily dangerous. Given the recent double-booking
issue and a lack so far of other theories on how we get there, this is a
possible culprit.
solution: Re-factor queue_policy_base_t remove into remove and
remove_pending, the latter of which only operates on the pending states
and has no code-paths that can result in a resource.cancel RPC being
sent. The remove_pending is used for both the cancel RPC and the part
of the free RPC where the code was used before, should be a pure
refactor.1 parent 4918eca commit 30a4ed9
File tree
3 files changed
+64
-33
lines changed- qmanager
- modules
- policies/base
3 files changed
+64
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | | - | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
270 | 271 | | |
271 | 272 | | |
272 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
273 | 285 | | |
274 | 286 | | |
275 | 287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
189 | 194 | | |
190 | 195 | | |
191 | 196 | | |
| |||
336 | 341 | | |
337 | 342 | | |
338 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
339 | 383 | | |
340 | 384 | | |
341 | 385 | | |
| |||
349 | 393 | | |
350 | 394 | | |
351 | 395 | | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
| 396 | + | |
378 | 397 | | |
379 | 398 | | |
380 | 399 | | |
| |||
593 | 612 | | |
594 | 613 | | |
595 | 614 | | |
596 | | - | |
| 615 | + | |
597 | 616 | | |
598 | 617 | | |
599 | 618 | | |
| |||
614 | 633 | | |
615 | 634 | | |
616 | 635 | | |
617 | | - | |
| 636 | + | |
618 | 637 | | |
619 | 638 | | |
620 | 639 | | |
| |||
644 | 663 | | |
645 | 664 | | |
646 | 665 | | |
647 | | - | |
| 666 | + | |
648 | 667 | | |
649 | 668 | | |
650 | 669 | | |
| |||
685 | 704 | | |
686 | 705 | | |
687 | 706 | | |
688 | | - | |
| 707 | + | |
689 | 708 | | |
690 | 709 | | |
691 | 710 | | |
| |||
0 commit comments