Commit fd640a3
committed
Fail Suspend/Postpone when function is currently interrupted
Previously, SuspendFunction and PostponeFunction silently absorbed the
interrupted flag at the storage layer: they converted the requested
state into Postponed(expires=0) and cleared the flag, returning true.
The runtime never saw that an interrupt had been observed.
Now both methods return false when the row has interrupted=true,
letting the caller treat the interrupt as a real signal:
- SuspendFunction: gains AND interrupted = FALSE in its WHERE clause
- PostponeFunction: same, but gated on a new failIfInterrupted=true
default param so InvocationHelper.Reschedule can still pass false to
consume the interrupt and queue the function for immediate re-pickup
- InvocationHelper.PersistResult Postpone case now returns Reschedule
on false (was: Success on both branches, swallowing failure)
Replaces 4 obsolete tests that pinned the old silent-convert behaviour
with 3 new tests covering the new contract across all 4 stores.1 parent 2053d22 commit fd640a3
16 files changed
Lines changed: 252 additions & 209 deletions
File tree
- Core
- Cleipnir.ResilientFunctions.Tests
- InMemoryTests
- TestTemplates
- WatchDogsTests
- Cleipnir.ResilientFunctions
- CoreRuntime/Invocation
- Storage
- Samples/Sample.ConsoleApp/Utils
- Stores
- MariaDB
- Cleipnir.ResilientFunctions.MariaDB.Tests
- Cleipnir.ResilientFunctions.MariaDB
- PostgreSQL
- Cleipnir.ResilientFunctions.PostgreSQL.Tests
- Cleipnir.ResilientFunctions.PostgreSQL
- SqlServer
- Cleipnir.ResilientFunctions.SqlServer.Tests
- Cleipnir.ResilientFunctions.SqlServer
Lines changed: 6 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 130 | + | |
| 131 | + | |
136 | 132 | | |
137 | 133 | | |
138 | 134 | | |
| |||
187 | 183 | | |
188 | 184 | | |
189 | 185 | | |
190 | | - | |
191 | | - | |
| 186 | + | |
| 187 | + | |
192 | 188 | | |
193 | 189 | | |
194 | 190 | | |
195 | 191 | | |
196 | 192 | | |
197 | 193 | | |
198 | | - | |
199 | | - | |
| 194 | + | |
| 195 | + | |
200 | 196 | | |
201 | 197 | | |
202 | 198 | | |
| |||
Lines changed: 27 additions & 73 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
930 | | - | |
931 | | - | |
| 930 | + | |
| 931 | + | |
932 | 932 | | |
933 | 933 | | |
934 | | - | |
| 934 | + | |
935 | 935 | | |
936 | 936 | | |
937 | | - | |
| 937 | + | |
938 | 938 | | |
939 | 939 | | |
940 | 940 | | |
| |||
944 | 944 | | |
945 | 945 | | |
946 | 946 | | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
| 947 | + | |
951 | 948 | | |
952 | | - | |
953 | | - | |
954 | 949 | | |
955 | 950 | | |
956 | 951 | | |
957 | 952 | | |
958 | 953 | | |
959 | 954 | | |
960 | 955 | | |
961 | | - | |
962 | | - | |
963 | | - | |
964 | | - | |
965 | | - | |
966 | | - | |
967 | | - | |
968 | | - | |
969 | | - | |
970 | | - | |
971 | | - | |
972 | | - | |
973 | | - | |
974 | | - | |
975 | | - | |
976 | | - | |
977 | | - | |
978 | | - | |
979 | | - | |
980 | | - | |
981 | | - | |
982 | | - | |
983 | | - | |
984 | | - | |
985 | | - | |
986 | | - | |
987 | | - | |
988 | | - | |
989 | | - | |
| 956 | + | |
990 | 957 | | |
991 | | - | |
992 | | - | |
993 | | - | |
994 | | - | |
995 | | - | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
1005 | | - | |
1006 | | - | |
1007 | | - | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
1008 | 961 | | |
1009 | 962 | | |
1010 | 963 | | |
| |||
1411 | 1364 | | |
1412 | 1365 | | |
1413 | 1366 | | |
1414 | | - | |
1415 | | - | |
| 1367 | + | |
| 1368 | + | |
1416 | 1369 | | |
1417 | 1370 | | |
1418 | 1371 | | |
| |||
1430 | 1383 | | |
1431 | 1384 | | |
1432 | 1385 | | |
1433 | | - | |
| 1386 | + | |
1434 | 1387 | | |
1435 | | - | |
1436 | | - | |
| 1388 | + | |
| 1389 | + | |
1437 | 1390 | | |
1438 | 1391 | | |
1439 | 1392 | | |
1440 | 1393 | | |
1441 | | - | |
1442 | | - | |
| 1394 | + | |
1443 | 1395 | | |
1444 | 1396 | | |
1445 | | - | |
1446 | | - | |
| 1397 | + | |
| 1398 | + | |
1447 | 1399 | | |
1448 | 1400 | | |
1449 | 1401 | | |
| |||
1452 | 1404 | | |
1453 | 1405 | | |
1454 | 1406 | | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
1458 | 1410 | | |
1459 | 1411 | | |
1460 | 1412 | | |
| |||
1472 | 1424 | | |
1473 | 1425 | | |
1474 | 1426 | | |
1475 | | - | |
| 1427 | + | |
1476 | 1428 | | |
1477 | 1429 | | |
1478 | | - | |
| 1430 | + | |
1479 | 1431 | | |
1480 | 1432 | | |
1481 | 1433 | | |
1482 | | - | |
1483 | | - | |
1484 | | - | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
1485 | 1437 | | |
1486 | 1438 | | |
1487 | 1439 | | |
| 1440 | + | |
| 1441 | + | |
1488 | 1442 | | |
1489 | 1443 | | |
1490 | 1444 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
| 135 | + | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
140 | | - | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
144 | | - | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
511 | | - | |
| 511 | + | |
| 512 | + | |
512 | 513 | | |
513 | 514 | | |
514 | 515 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | | - | |
| 301 | + | |
| 302 | + | |
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
| 310 | + | |
309 | 311 | | |
310 | 312 | | |
311 | | - | |
| 313 | + | |
312 | 314 | | |
313 | 315 | | |
314 | 316 | | |
| |||
358 | 360 | | |
359 | 361 | | |
360 | 362 | | |
| 363 | + | |
| 364 | + | |
361 | 365 | | |
362 | | - | |
| 366 | + | |
363 | 367 | | |
364 | 368 | | |
365 | 369 | | |
366 | | - | |
367 | 370 | | |
368 | 371 | | |
369 | 372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | | - | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| |||
Lines changed: 7 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 119 | + | |
| 120 | + | |
125 | 121 | | |
126 | 122 | | |
127 | 123 | | |
| |||
176 | 172 | | |
177 | 173 | | |
178 | 174 | | |
179 | | - | |
180 | | - | |
181 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
182 | 178 | | |
183 | 179 | | |
184 | 180 | | |
185 | 181 | | |
186 | 182 | | |
187 | | - | |
188 | | - | |
| 183 | + | |
| 184 | + | |
189 | 185 | | |
190 | 186 | | |
191 | 187 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
| 512 | + | |
| 513 | + | |
513 | 514 | | |
514 | 515 | | |
515 | 516 | | |
516 | 517 | | |
517 | 518 | | |
518 | 519 | | |
519 | 520 | | |
520 | | - | |
| 521 | + | |
521 | 522 | | |
522 | 523 | | |
523 | 524 | | |
| |||
0 commit comments