Skip to content

[Bug]The bufferLocal size of the TimerMessageStore not enough  #9654

@ymwneu

Description

@ymwneu

Before Creating the Bug Report

  • I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

centos

RocketMQ version

latest version

JDK Version

jdk8

Describe the Bug

There is a variable called bufferLocal in TimerMessageStore, which is used to store a single message from the commitlog. The initial size of bufferLocal is currently set to maxMessageSize plus 100 bytes. Since some properties may be added during the intermediate stages of scheduled messages, the maximum message size can exceed maxMessageSize. Although an extra 100 bytes is reserved during initialization, in some scenarios this is not sufficient, resulting in message read failures and subsequently blocking the entire scheduled message process.

Steps to Reproduce

Send a timer message with its size set to the maximum allowed message size.

What Did You Expect to See?

Messages can be retrieved normally in TimerDequeueGetMessageService.

What Did You See Instead?

An exception is thrown when retrieving messages in TimerDequeueGetMessageService.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions