Skip to content

[Doc] Correct misleading buffer comment in CommitLog#doAppend #10819

Description

@fuyou001

Search before creation

  • I had searched in the issues and pull requests and found no similar report.

Documentation Related

In store/src/main/java/org/apache/rocketmq/store/CommitLog.java, DefaultAppendMessageCallback#doAppend(...) currently contains:

// Write messages to the queue buffer
byteBuffer.put(preEncodeBuffer);

The comment is misleading. The byteBuffer is the destination buffer supplied by DefaultMappedFile#appendMessagesInner(...) for appending the encoded message through the CommitLog write path. Depending on configuration, it can be backed by the mapped byte buffer, the transient write buffer, or a shared staging buffer used by the writeWithoutMmap path. It is not a queue or ConsumeQueue buffer.

The comment should describe appending the encoded message to the current CommitLog buffer. This is a documentation-only correction and does not change runtime behavior.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions