When tasks are re-submitted with the same key, `Scheduler.queued` may return stale `TaskState` objects
Open
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 778
- Avg merge
- 2h 50m
- Merged PRs (30d)
- 3
Description
In `distributed/tests/test_client.py::test_threadsafe_get` we saw an assertion error during scheduling of queued tasks where a task was already forgotten even though the scheduler just tried to assign this task.
https://github.com/dask/distributed/actions/runs/4026033623/jobs/6920058827
```
File "D:\a\distributed\distributed\distributed\scheduler.py", line 4617, in stimulus_queue_slots_maybe_opened
assert qts.state == "queued", qts.state
AssertionError: forgotten
```
cc @gjoseph92
Contributor guide
Assessment
This issue has not been assessed yet.