Skip to content

scheduler: snapshot job volumes in placement request to fix data race - #7

Merged
phaus merged 1 commit into
mainfrom
fix/scheduler-volumes-race
Sep 4, 2026
Merged

scheduler: snapshot job volumes in placement request to fix data race#7
phaus merged 1 commit into
mainfrom
fix/scheduler-volumes-race

Conversation

@phaus

@phaus phaus commented Sep 4, 2026

Copy link
Copy Markdown
Member

The StartJob goroutine iterates job.Volumes to create any pending volumes on the selected host, while the main scheduler loop can replace job.Volumes wholesale in handleActiveJob. This is a concurrent read/write race on the slice field.

Snapshot the assigned volumes into the PlacementRequest when it is handled in the main loop, and have StartJob iterate that snapshot instead of the mutable job.Volumes field.

The StartJob goroutine iterates job.Volumes to create any pending
volumes on the selected host, while the main scheduler loop can replace
job.Volumes wholesale in handleActiveJob. This is a concurrent read/write
race on the slice field.

Snapshot the assigned volumes into the PlacementRequest when it is
handled in the main loop, and have StartJob iterate that snapshot instead
of the mutable job.Volumes field.
@phaus
phaus merged commit 9d264e4 into main Sep 4, 2026
2 checks passed
@phaus
phaus deleted the fix/scheduler-volumes-race branch September 4, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant