rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

[Bug] there is a problem of transaction message submission loss when there are two replicas and minSync=2 in controller mode

Open mz0113 opened this issue 1 year ago • 0 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

windows 11

RocketMQ version

rocketmq v5.1.4

JDK Version

JDK8

Describe the Bug

controller模式下 , broker为两副本且minSync=2 当发送一笔事务半消息成功后,半消息进入半事务队列,然后本地事务提交这笔消息以后. 半消息将从半事务队列转移到业务消息Topic中,在转发的过程中依然会判断minSync是否满足设置的条件,如果此时从节点broker掉线,那么minSync不满足2这个条件,导致半消息转移失败,重试多次后最终被丢弃.

Steps to Reproduce

如上

What Did You Expect to See?

消息不应该丢弃,或者尽量至少给一个可配置的参数选项能决定是否让半事务消息继续转移,我认为此时不满足minSync=2的时候,半事务消息转移的动作可以暂停不做,而不是转移失败导致消息被丢弃

What Did You See Instead?

事务消息没有被转移到业务普通Topic中

Additional Context

No response

mz0113 avatar Dec 28 '23 04:12 mz0113