IGNITE-28980 BinaryMemoryAllocator$ThreadLocalAllocator$Chunk resets maxMsgSize on shrink check - #13487
Open
mroeppis wants to merge 1 commit into
Open
IGNITE-28980 BinaryMemoryAllocator$ThreadLocalAllocator$Chunk resets maxMsgSize on shrink check#13487mroeppis wants to merge 1 commit into
mroeppis wants to merge 1 commit into
Conversation
mroeppis
commented
Aug 16, 2026
Contributor
- reset maxMsgSize on shrink check to allow for lower size on next check
- test covers shrink behavior to verify feature
zstan
reviewed
Aug 17, 2026
Contributor
|
Minor issue: remove the colon after ticket number |
There was a problem hiding this comment.
Pull request overview
This PR updates the thread-local binary memory allocator shrink logic so that the tracked maxMsgSize is reset after each periodic shrink check, allowing subsequent checks to shrink the buffer based on newer (possibly smaller) message sizes. It also adds a regression test intended to validate the shrink behavior after writing a large message followed by a small one.
Changes:
- Reset
BinaryMemoryAllocator.ThreadLocalAllocator.Chunk.maxMsgSizeafter each shrink check. - Add
ThreadLocalAllocatorChunkShrinkTestto validate that the thread-local buffer shrinks after a small write following a large write.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| modules/binary/impl/src/main/java/org/apache/ignite/internal/binary/streams/BinaryMemoryAllocator.java | Resets maxMsgSize after the time-based shrink check to allow shrinking based on later smaller messages. |
| modules/core/src/test/java/org/apache/ignite/internal/binary/streams/ThreadLocalAllocatorChunkShrinkTest.java | Adds a JUnit test that exercises “large write then small write” and asserts the thread-local buffer shrinks accordingly. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ot reset maxMsgSize after shrink check * reset maxMsgSize on shrink check * test covers shrink behavior
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.