Commit fb8f5fb
authored
chore: fix polling event watcher self-unsubscribe deadlock (#33732)
## Summary & Motivation
Closes #5127.
Updated the polling watcher to stop invoking callbacks while holding
_callback_fn_list_lock, which removes the self-unsubscribe deadlock path
in
python_modules/dagster/dagster/_core/storage/event_log/polling_event_watcher.py.
The implementation now snapshots the callback list under lock and
dispatches outside it. I also re-enabled the skipped regression in
python_modules/dagster/dagster_tests/storage_tests/utils/event_log_storage.py.
## Test Plan
- python -m pytest
python_modules/dagster/dagster_tests/storage_tests/test_polling_event_watcher.py
- python -m pytest
python_modules/dagster/dagster_tests/storage_tests/test_event_log.py -k
'watch_unwatch and TestSqliteEventLogStorage'
- python -m pytest
python_modules/dagster/dagster_tests/storage_tests/test_event_log.py -k
'watch_unwatch and TestConsolidatedSqliteEventLogStorage'
## Changelog
> The changelog is generated by an agent that examines merged PRs and
> summarizes/categorizes user-facing changes. You can optionally replace
> this text with a terse description of any user-facing changes in your
PR,
> which the agent will prioritize. Otherwise, delete this section.1 parent b8b7f3f commit fb8f5fb
2 files changed
Lines changed: 14 additions & 12 deletions
File tree
- python_modules/dagster
- dagster_tests/storage_tests/utils
- dagster/_core/storage/event_log
Lines changed: 14 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
160 | 164 | | |
161 | 165 | | |
162 | 166 | | |
| |||
177 | 181 | | |
178 | 182 | | |
179 | 183 | | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
191 | 194 | | |
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2710 | 2710 | | |
2711 | 2711 | | |
2712 | 2712 | | |
2713 | | - | |
2714 | 2713 | | |
2715 | 2714 | | |
2716 | 2715 | | |
| |||
0 commit comments