Skip to content

IGNITE-28310 Optimize ClientInboundMessageHandler#writeError#7943

Merged
ptupitsyn merged 4 commits intoapache:mainfrom
ptupitsyn:ignite-28310
Apr 8, 2026
Merged

IGNITE-28310 Optimize ClientInboundMessageHandler#writeError#7943
ptupitsyn merged 4 commits intoapache:mainfrom
ptupitsyn:ignite-28310

Conversation

@ptupitsyn
Copy link
Copy Markdown
Contributor

@ptupitsyn ptupitsyn commented Apr 7, 2026

  • Remove legacy stack trace retrieval code, use simple printStackTrace
  • Remove extra toString call, pass CharSequence to ClientMessagePacker

https://issues.apache.org/jira/browse/IGNITE-28310

@ptupitsyn ptupitsyn requested a review from isapego as a code owner April 7, 2026 14:43
@ptupitsyn ptupitsyn requested review from Copilot and removed request for isapego April 7, 2026 14:45
Copy link
Copy Markdown

Copilot AI left a comment

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 optimizes server-to-client error serialization by simplifying stack trace extraction and reducing allocations when packing stack traces into MsgPack messages (used by the thin client protocol).

Changes:

  • Simplify ExceptionUtils.getFullStackTrace to rely on Throwable#printStackTrace and return a CharSequence to avoid an extra toString() allocation.
  • Broaden ClientMessagePacker.packString to accept CharSequence, enabling direct packing of StringBuffer/StringBuilder without conversion.
  • Update test fixture matcher to adapt to the new CharSequence return type.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
modules/core/src/testFixtures/java/org/apache/ignite/internal/testframework/matchers/CompletableFutureExceptionMatcher.java Adjusts mismatch description building to handle CharSequence stack traces.
modules/core/src/main/java/org/apache/ignite/internal/util/ExceptionUtils.java Reworks full stack trace extraction and changes the return type to CharSequence.
modules/client-common/src/main/java/org/apache/ignite/internal/client/proto/ClientMessagePacker.java Updates packString API to accept CharSequence for lower-allocation packing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ptupitsyn ptupitsyn requested a review from isapego April 8, 2026 08:46
@ptupitsyn ptupitsyn merged commit a333ed6 into apache:main Apr 8, 2026
5 checks passed
@ptupitsyn ptupitsyn deleted the ignite-28310 branch April 8, 2026 08:52
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.

3 participants