Commit 880e904
committed
Fix lost stop event on boundary updates
When an update arrives exactly at a dispatch stop boundary, the update
path can remove the pending stop event before the timer delivers it.
If no immediate runtime-change notification is emitted, the actor never
receives the stop event and keeps running after the dispatch window has
already elapsed.
Keep track of the removed queue item and emit the missing stop
notification when an update removes a stop event for a dispatch that is
no longer started. Add a regression test for the boundary-update case.
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>1 parent eb0ba0b commit 880e904
File tree
2 files changed
+82
-5
lines changed- src/frequenz/dispatch
- tests
2 files changed
+82
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
| 489 | + | |
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
494 | 500 | | |
495 | 501 | | |
496 | 502 | | |
| |||
507 | 513 | | |
508 | 514 | | |
509 | 515 | | |
510 | | - | |
| 516 | + | |
511 | 517 | | |
512 | 518 | | |
513 | 519 | | |
514 | 520 | | |
515 | 521 | | |
516 | 522 | | |
517 | | - | |
| 523 | + | |
518 | 524 | | |
519 | 525 | | |
520 | 526 | | |
521 | 527 | | |
522 | 528 | | |
523 | | - | |
| 529 | + | |
524 | 530 | | |
525 | | - | |
| 531 | + | |
526 | 532 | | |
527 | 533 | | |
528 | 534 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
907 | 907 | | |
908 | 908 | | |
909 | 909 | | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
910 | 915 | | |
911 | 916 | | |
912 | 917 | | |
| |||
993 | 998 | | |
994 | 999 | | |
995 | 1000 | | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
996 | 1005 | | |
997 | 1006 | | |
998 | 1007 | | |
| |||
1096 | 1105 | | |
1097 | 1106 | | |
1098 | 1107 | | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
0 commit comments