Skip to content

[ISSUE #10837] fix(client): keep decoding after truncated trace records - #11214

Open
zmuxuny wants to merge 1 commit into
apache:developfrom
zmuxuny:fix/trace-decode-truncated-records
Open

zmuxuny wants to merge 1 commit into
apache:developfrom
zmuxuny:fix/trace-decode-truncated-records

Conversation

@zmuxuny

@zmuxuny zmuxuny commented Sep 23, 2026

Copy link
Copy Markdown

Which Issue(s) This PR Fixes

Brief Description

A truncated trace entry currently throws while decoderFromTraceDataString indexes or parses its fields, so valid entries later in the same trace message are lost. Decode each entry independently and skip entries with missing or invalid required fields. Preserve trailing empty fields, which are valid for a SubBefore entry with no keys, and keep the older 12-field Pub format readable.

The earlier #10847 was closed without merging. This version also handles records cut off at a numeric field, where a field-count check alone still throws, and tests all five trace types for later-record recovery.

How Did You Test This Change?

  • Reproduced ArrayIndexOutOfBoundsException for a valid empty-key SubBefore entry and NumberFormatException for a record cut off at its numeric message-type field before the fix.
  • JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 PATH=/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH mvn -B -ntp -pl client -am -Dtest=TraceDataEncoderTest -Dsurefire.failIfNoSpecifiedTests=false test — 12 tests passed, including the new truncated-record, numeric-boundary, legacy-format, and empty-key cases. The Maven lifecycle ran Checkstyle and SpotBugs.
  • git diff --check — passed.

@zmuxuny

zmuxuny commented Oct 23, 2026

Copy link
Copy Markdown
Author

@RongtongJin Could you help unblock CI for these seven PRs? I checked the 49 current-head workflow records: none returned an executed job, so these results do not establish a code-test failure.

#11214, #11217 and #11218 still await maintainer approval. Their runs were created nearly 30 days ago:
https://github.com/apache/rocketmq/actions/runs/35850919224
https://github.com/apache/rocketmq/actions/runs/35851896018
https://github.com/apache/rocketmq/actions/runs/35852327482

Could you approve the pending workflows and help restart CI for #11173, #11175, #11211 and #11213, whose zero-job runs are now marked failed? The timing is consistent with an approval-wait expiry, rather than executed tests failing. All seven currently report mergeable=true, but still need CI and review. Keeping this request in one thread rather than pinging each PR. Thanks.

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.

TraceDataEncoder fails after a truncated trace record

1 participant