You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 008457d
Browse filesBrowse the repository at this point in the historyBrowse files
Alexey Shalaev
committed
fix: cancellation propagates from run_maintenance_safe
run_maintenance_safe caught CancelledError, KeyboardInterrupt and SystemExit and returned them on result.error, so asyncio.timeout() never fired, a cancelled task did not end cancelled, and Ctrl+C in the sync mirror was swallowed. They now propagate from both mirrors; every Exception still lands on result.error.
The Redis lock stops a run whose lease it lost by cancelling it. It now takes that cancellation back and raises LockLostError, so a lost lease is still reported on the result; a cancellation from outside at the same time still propagates.
Closes#107
Copy file name to clipboardExpand all lines: CHANGELOG.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
26
26
27
27
* a backfilled window always attaches with writers held at the parent ([#89](https://github.com/bedrock-python/pg-partsmith/issues/89)) ([b1260c1](https://github.com/bedrock-python/pg-partsmith/commit/b1260c1a8bcdd6388c3836d57eb548f8fe5959bb))
28
28
29
+
## 1.8.2 — cancellation stops a run_maintenance_safe
30
+
31
+
`run_maintenance_safe()` caught `asyncio.CancelledError`, `KeyboardInterrupt` and `SystemExit`
32
+
and returned them on `result.error`, so the tools asyncio stops work with did nothing to it:
33
+
`asyncio.timeout()` never raised, a cancelled task did not end cancelled, and a shutdown that
34
+
cancels its tasks saw a completed run
35
+
([#107](https://github.com/bedrock-python/pg-partsmith/issues/107)). They now propagate from
36
+
both mirrors, after `run_maintenance()` has logged them; every `Exception` still lands on
37
+
`result.error`.
38
+
39
+
A Redis lock whose lease is lost mid-run used to stop the run by cancelling it, and that
40
+
cancellation was what reached `result.error`. The lock now takes its own cancellation back and
41
+
raises `LockLostError`, a `PartitionError`, so a lost lease is still reported on the result. If
42
+
the task was cancelled from outside at the same moment, the cancellation wins.
43
+
29
44
## 1.8.1 — the two findings survive a policy that reads facts
30
45
31
46
`unattached_rows` (1.7.0) and `rows_in_default` (1.8.0) went missing whenever the lifecycle
Copy file name to clipboardExpand all lines: docs/concepts/execution.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -172,8 +172,12 @@ it takes on `op.capabilities`.
172
172
| any other error — a connection drop, a permission denied, a `before_*` hook raising | aborts the run, unless `continue_on_error`, in which case it is recorded and the next operation runs |
0 commit comments