Skip to content

[Bug] 判断消息是否拒绝逻辑取反? org.apache.rocketmq.store.timer.TimerMessageStore#isReject #7573

@1040087877

Description

@1040087877

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

RocketMQ version

5.0 develop分支

JDK Version

No response

Describe the Bug

org.apache.rocketmq.store.timer.TimerMessageStore#isReject

if (RANDOM.nextInt(1000) > 1000 * (congestNum - storeConfig.getTimerCongestNumEachSlot()) / (storeConfig.getTimerCongestNumEachSlot() + 0.1)) {
return true;
}

这里的逻辑是否取反,return true 表示拒绝,

假设左边随机数固定,右边congestNum 越大 总体值不是越大,这样就拦截不了。

Steps to Reproduce

What Did You Expect to See?

What Did You See Instead?

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