Skip to content

THRIFT-6006: Implement MESSAGE_SIZE_LIMIT exception type for Haxe library#3485

Merged
Jens-G merged 1 commit into
apache:masterfrom
Jens-G:THRIFT-6006
May 15, 2026
Merged

THRIFT-6006: Implement MESSAGE_SIZE_LIMIT exception type for Haxe library#3485
Jens-G merged 1 commit into
apache:masterfrom
Jens-G:THRIFT-6006

Conversation

@Jens-G
Copy link
Copy Markdown
Member

@Jens-G Jens-G commented May 15, 2026

Summary

Implements the MESSAGE_SIZE_LIMIT transport exception type for the Haxe library, analogous to the Java fix in THRIFT-5858 / PR #3115.

Problem: When a transport reads more bytes than the configured maximum message size, it threw a TTransportException with type END_OF_FILE. This makes debugging difficult — servers swallow the exception silently and clients only see "socket closed by peer", with no indication that a message size limit was exceeded.

Changes:

  • TTransportException.hx: Add CORRUPTED_DATA = 5 and MESSAGE_SIZE_LIMIT = 6 constants (matching Java values for cross-language consistency)
  • TEndpointTransport.hx: Replace END_OF_FILE throws with MESSAGE_SIZE_LIMIT in ResetConsumedMessageSize, CheckReadBytesAvailable, and CountConsumedMessageBytes; improve error messages to include the configured limit and actual byte counts

Test plan

  • Haxe library compiles without errors
  • Existing Haxe transport tests pass
  • Exception type is MESSAGE_SIZE_LIMIT (6) when message size limit is exceeded

Subtask of THRIFT-5858 — tracked as THRIFT-6006.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

…rary

Client: haxe

- Add CORRUPTED_DATA = 5 and MESSAGE_SIZE_LIMIT = 6 to TTransportException
- Replace END_OF_FILE throws with MESSAGE_SIZE_LIMIT in TEndpointTransport
  for ResetConsumedMessageSize, CheckReadBytesAvailable, CountConsumedMessageBytes
- Improve error messages to include the configured limit and actual byte counts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mergeable mergeable Bot added the haxe label May 15, 2026
@Jens-G Jens-G marked this pull request as ready for review May 15, 2026 11:42
@Jens-G Jens-G merged commit 512d9ea into apache:master May 15, 2026
96 of 98 checks passed
@Jens-G Jens-G deleted the THRIFT-6006 branch May 15, 2026 11:47
@Jens-G Jens-G self-assigned this May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant