[Bug] EscapeBridge fails to decode messages when queue-offset metadata is incomplete
- Dominant language
- Java
- Stars
- 22.6k
- Forks
- 12k
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 27
Description
## Reproduction
`EscapeBridge.decodeMsgList` iterates the message buffers and unconditionally reads `getMessageQueueOffset().get(i)`. If a `GetMessageResult` contains a valid message buffer but the queue-offset metadata is missing or shorter than the buffer list, the method throws `IndexOutOfBoundsException`.
This turns a recoverable failover-read metadata inconsistency into a failed escape-bridge read.
## Expected behavior
Decode valid messages even when the optional queue-offset list is incomplete. Apply the CQ offset only when it exists; otherwise retain the decoded message offset.
## Scope
Guard the offset lookup and add a regression test using a valid encoded message with no queue-offset metadata.
Contributor guide
Research direction
Start at EscapeBridge.decodeMsgList and reproduce the case with a valid encoded message whose queue-offset metadata is missing or shorter than the message buffers. Add a regression test covering absent metadata, then verify valid messages decode without IndexOutOfBoundsException and retain their decoded offset when no CQ offset exists.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 85/100