Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Bug] Missing of valueOfCurrentMinusBorn equals checkImmunityTime #9486

Copy link
Copy link
@WJ66880

Description

@WJ66880
Issue body actions

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

It has nothing to do with the OS.

RocketMQ version

Using version: 432, bug the latest version has the same bug.

JDK Version

It has nothing to do with the JDK.

Describe the Bug

In transaction message check task, when valueOfCurrentMinusBorn == checkImmunityTime, the current half offset will drive the while(true) loop for dozens of times.
See the debug picture below:

Image

logs in transaction.log picture:

Image

Steps to Reproduce

Send tx message withe a hign throughput, and return commit or rollback in executeLocalTranstion method use condition
if (counter.getAndIncrement() % 100 == 0) { return LocalTransactionState.COMMIT_MESSAGE; } return LocalTransactionState.UNKNOW;

What Did You Expect to See?

When valueOfCurrentMinusBorn == checkImmunityTime happened by chance, break the loop or trigger the check back, either is ok. I prefer to choose break.

What Did You See Instead?

When valueOfCurrentMinusBorn == checkImmunityTime happened by chance, the while(true) loop didn't break.

Additional Context

No response

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.