rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

[Bug] Transaction producer didn't receive CheckTransacationState request of pending message

Open redlsz opened this issue 1 year ago • 5 comments

Before Creating the Bug Report

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

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

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

Runtime platform environment

unreleated

RocketMQ version

5.x

JDK Version

1.8

Describe the Bug

image

In transaction message scenario, the first time execution result was UNKNOW. We expected to receive broker's check request later, but did not.

Steps to Reproduce

  1. Startup server in proxy cluster mode
  2. Startup a remoting TransactionProducer
  3. Sleep 5 seconds before sending one transaction message, and return UNKNOW in TransactionListener#executeLocalTransaction
  4. Keep TransactionProducer running and don't send more messages
  5. Observe whether TransactionListener#checkLocalTransaction will be called

What Did You Expect to See?

TransactionListener#checkLocalTransaction will be called

What Did You See Instead?

TransactionListener#checkLocalTransaction has not been called

Additional Context

No response

redlsz avatar Jun 20 '24 08:06 redlsz

image

Transaction log indicates that the broker cannot find producer channel when trying to call client CheckTransactionState.

image

In this case, the producer send message before its first heartbeat, which causes offline misjudgement when scanning at ClusterTransactionService#scanProducerHeartBeat. Eventually, this producer will not be registered to brokers.

redlsz avatar Jun 20 '24 09:06 redlsz

This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.

github-actions[bot] avatar Jun 21 '25 00:06 github-actions[bot]

This issue was closed because it has been inactive for 3 days since being marked as stale.

github-actions[bot] avatar Jun 24 '25 00:06 github-actions[bot]