Skip to content

solver: use read locks for state snapshots - #6917

Merged
tonistiigi merged 2 commits into
moby:masterfrom
tonistiigi:solver-readlock
Jul 2, 2026
Merged

solver: use read locks for state snapshots#6917
tonistiigi merged 2 commits into
moby:masterfrom
tonistiigi:solver-readlock

Conversation

@tonistiigi

Copy link
Copy Markdown
Member

follow-up #6916

Change solver state locking to RWMutex and use read locks for read-only
snapshots of jobs, resolver caches, cache managers, and metadata.

Snapshot the state's job set under state.mu before walking job values.
This matches the lock used by job attach and discard paths and avoids
concurrent map iteration when op resolution loads shared job values.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Change solver state locking to RWMutex and use read locks for read-only
snapshots of jobs, resolver caches, cache managers, and metadata.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@crazy-max crazy-max added this to the v0.32.0 milestone Jul 1, 2026
@tonistiigi
tonistiigi merged commit d91ba97 into moby:master Jul 2, 2026
193 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants