Repository navigation
Skip the free-slot suspension while a Session on the node initializes - #813
Merged
Merged
Conversation
A node runs one operation at a time, so a free-slot suspension started while a just-created Session initializes delays its preparation operations behind the suspend. The free-slot rule now also waits while any Session placed on the node has no sandbox or has not finished its Environment initialization.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A node runs one lifecycle operation at a time. #811 stopped the free-slot suspension while a placed Session had no sandbox yet, but a Session whose sandbox exists still sends its preparation operations to the node during initialization. A free-slot suspension started in that window puts them behind the suspend.
On mx (run-pr812, 8cf120b) a Session's sandbox was created at 17:54:46.99, a free-slot suspension of another idle allocation started 0.25 s later, and the Session's
restore_preparationwaitedqueue_ms=4968in the node queue. That Session reached ready in 19.2 s.The free-slot rule now waits while any Session placed on the node has no allocation yet or its Environment initialization is
pendingorrunning(ListRuntimeStartingNodes). This replaces theReservedplacement count #811 added toplacement.Node; the node list keeps its ownreservedfield for Web.Checks:
go vet ./...,go test ./internal/deployment/..., and the deploymentpg pressure and free-slot tests against Postgres 16 (TestFreeSlotWaitsForStartingSessioncovers both a placement waiting for its sandbox and an initializing allocation).Need help on this PR? Tag
@codesmith-botwith what you need.