aws / aws/aws-durable-execution-sdk-python

revisit locking strategy in local runner

Open
#639 0 comments 0 reactions 0 assignees View on GitHub
pkg:testing
Dominant language
Python
Stars
53
Forks
25
Avg merge
1d 17h
Merged PRs (30d)
37

Description

the extra `_state_lock` is actually not necessary, and if anything we could/should _probably_ remove it from get_navigable and friends, reason being the recent lane-based re-architecture isolated an execution into its own lane that serializes Checkpoint writes that run as CheckpointTask on that same lane, so the read and write cannot overlap.

however, that's wider refactor beyond the scope fo this PR, and since the lock is harmless and for the sake of symmetry might as well let it stand as introduced here and then revisit clean-up opportunities for redundant locks throughout later.

_Originally posted by @yaythomas in https://github.com/aws/aws-durable-execution-sdk-python/issues/637#issuecomment-5287117584_

Contributor guide

Open the contributing guide

Research direction

Start by locating the local runner and the get_navigable methods, then trace how the lane-based execution serializes Checkpoint writes performed by CheckpointTask. Determine whether _state_lock is redundant for these reads and writes. Done means the locking strategy is simplified only where safe, with redundant-lock cleanup clearly separated from the wider refactor.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.