dask / dask/zict

get(), pop(), popitem(), and setdefault() are not thread-safe

Open
#99 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
72
Forks
31
PR merge metrics
No merged PRs in 30d

Description

#92 left a few important methods of MutableMapping prone to race conditions.

`get()` may or may not be thread-safe depending on the implementation details in collections.abc.
`pop()`, `popitem()` and `setdefault()` are definitely not thread-safe at the moment of writing.

Worth noting that this does not impact dask/distributed; the exclusion of their usage is enforced by the `distributed.spill.AsyncBufferProto` API contract.

Contributor guide

Open the contributing guide

Research direction

No implementation files or tests are named. Start by locating the MutableMapping implementations for get(), pop(), popitem(), and setdefault(), then inspect how issue #92 addressed thread safety. Reproduce concurrent access where possible and add coverage showing the affected methods are safe without changing the distributed.AsyncBufferProto contract.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.