Skip to content

IGNITE-28980 BinaryMemoryAllocator$ThreadLocalAllocator$Chunk resets maxMsgSize on shrink check - #13487

Open
mroeppis wants to merge 1 commit into
apache:masterfrom
mroeppis:ignite-28980
Open

IGNITE-28980 BinaryMemoryAllocator$ThreadLocalAllocator$Chunk resets maxMsgSize on shrink check#13487
mroeppis wants to merge 1 commit into
apache:masterfrom
mroeppis:ignite-28980

Conversation

@mroeppis

Copy link
Copy Markdown
Contributor
  • reset maxMsgSize on shrink check to allow for lower size on next check
  • test covers shrink behavior to verify feature

@chesnokoff

Copy link
Copy Markdown
Contributor

Minor issue: remove the colon after ticket number

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.maxMsgSize after each shrink check.
  • Add ThreadLocalAllocatorChunkShrinkTest to 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.

@mroeppis mroeppis changed the title IGNITE-28980: BinaryMemoryAllocator$ThreadLocalAllocator$Chunk resets maxMsgSize on shrink check IGNITE-28980 BinaryMemoryAllocator$ThreadLocalAllocator$Chunk resets maxMsgSize on shrink check Aug 17, 2026
…ot reset maxMsgSize after shrink check

* reset maxMsgSize on shrink check
* test covers shrink behavior
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.

4 participants