Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Transaction is committed only after at least once checkTransactionState, which causes message delay #8313

Open
3 tasks done
redlsz opened this issue Jun 19, 2024 · 0 comments · May be fixed by #8319
Open
3 tasks done

Comments

@redlsz
Copy link
Contributor

redlsz commented Jun 19, 2024

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

unrelated

RocketMQ version

5.x

JDK Version

1.8

Describe the Bug

image image

In Proxy mode + Remoting client scenario, transactions will be committed only after at least once checkTransactionState from broker, which causes message tens of seconds delay.

在 Proxy + Remoting 客户端的场景下,发现事务消息只有在 broker 回查后才能提交(或回滚),客户端执行完本地事务后的即时提交(或回滚)并没有生效,导致消息延迟了几十秒才写入业务 topic

Steps to Reproduce

  1. Startup server in proxy cluster mode
  2. Send transaction messages by remoting client, commit the transaction immediately in TransactionListener

What Did You Expect to See?

At server side, the transaction message will be committed and stored to real topic immediately.

What Did You See Instead?

The transaction message can only be committed after at least once checkTransactionState.

Additional Context

image image

事务消息发送成功后没有记录对应的 TransactionData,导致客户端第一次调用 EndTransaction 时 proxy 处理失败了

后续 broker 回查时 proxy 记录了对应的 TransactionData,所以回查后客户端再调用就能成功

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant