Repository navigation
Skip the free-slot suspension while a Session waits for its sandbox - #811
Merged
Merged
Conversation
A placement counts as active before its sandbox exists, so a node looked full right after a Session was placed on it. The node lane then ran a free-slot suspension and created the placed Session's sandbox only after it.
This was referenced Oct 21, 2026
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.
What users see
A new hosted Session placed on a full node no longer waits behind a free-slot suspension. On the test cluster one Session waited 6.6 s for it.
Cause
A placement counts as active before its sandbox exists. Right after a Session was placed on a node, the node looked full again, and the node lane, still in the same scan, found an allocation idle for over 2 minutes and suspended it under the free-slot rule. The lane creates sandboxes only between scans, so the placed Session's sandbox came after that suspension.
mx test, Core log (UTC): S1's allocation suspended at 15:17:52.450, S3 was placed on the freed slot, then
fc970892(idle since a regression case) started quiescing at 15:17:52.558 and was suspended at 15:17:59.152; S3's create started at 15:17:59.19.Changes
placement.NodecarriesReserved(placements without an allocation), whichListRuntimeNodesalready counts.Reserved == 0on the node. A later scan keeps the slot free once the placed Session has its sandbox.docs/sandbox-provider.mdand its Chinese mirror state the condition.Tests
TestFreeSlotWaitsForPlacedSession: an allocation idle for 3 minutes on a node that is full only because of a waiting placement is refused (ErrNotIdle). It fails without the new condition. Rango test ./internal/persistence/postgres/deploymentpg -run 'TestPressure|TestFreeSlot|Suspension|Suspend',go test ./internal/deployment/...andgo vet ./...forservices/core.Need help on this PR? Tag
@codesmith-botwith what you need.