fix(spop): negotiate frame sizes lazily#33
Merged
Conversation
This was referenced Jul 10, 2026
fionera
force-pushed
the
agent/negotiated-frame-sizes
branch
from
July 10, 2026 11:37
2f9d40e to
84a59a6
Compare
fionera
force-pushed
the
agent/negotiated-frame-sizes
branch
from
July 10, 2026 11:40
84a59a6 to
3a54535
Compare
fionera
force-pushed
the
agent/negotiated-frame-sizes
branch
from
July 10, 2026 12:00
3a54535 to
1d698f3
Compare
fionera
marked this pull request as ready for review
July 10, 2026 12:07
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.
Stacked on the handshake tests merged in #32.
Summary
max-frame-sizeActionWritergrow internally on demand and enforce the negotiated ACK limitHAProxy advertises
tune.bufsize - 4; there is no universal 64 KiB cap. HTTP configurations stay below 256 MiB, while TCP/SPOE configurations can approach 2 GiB, so lazy allocation is still required.Memory behavior
Escape analysis confirms the frame and backing slices are heap allocated.
sync.Poolretains grown buffers for reuse; the previous comment about a maximum stack slice size was incorrect. A large advertised value alone does not allocate a large buffer.Validation
go test ./...go test -race ./...GOARCH=386 go test ./...GOTOOLCHAIN=go1.21.13 go test ./...go test -tags=e2e ./spopgo vet ./...staticcheck ./...Fixes #14