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

message may be lost because of slave can report greater than local commitLog offset in sync_mater mode #3015

Closed
makabakaboom opened this issue Jun 20, 2021 · 3 comments

Comments

@makabakaboom
Copy link
Contributor

BUG REPORT

  1. Please describe the issue you observed:
  • What did you do (The steps to reproduce)?

1、创建一个SYNC_MASTER模式的集群
2、创建一个连接去连接同步端口,并往里面随机写一些数据
3、master节点会当做是slave上报的offset,并更新push2SlaveMaxOffset,导致后续写入消息可能未等到slave同步就已经返回producer
4、此时master宕机可能就会造成部分数据写master成功,但是还未由pageCache写入到磁盘,且未同步到slave而丢失

  • What did you expect to see?

1、判断为不合适的offset,并断掉连接

  • What did you see instead?

master节点会当做是slave上报的offset,并更新push2SlaveMaxOffset,导致后续写入消息可能未等到slave同步就已经返回producer

  1. Please tell us about your environment:

最新环境
3. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):

makabakaboom added a commit to makabakaboom/rocketmq that referenced this issue Jun 20, 2021
…break connection and return

when slaveAckOffset greater than local commitLog offset, break connection and return
@duhenglucky duhenglucky added this to the 4.9.1 milestone Jul 20, 2021
@areyouok
Copy link
Contributor

areyouok commented Sep 6, 2021

这个问题我们也遇到,我们的解决办法是给主从同步的tcp连接增加一个握手,我认为这才是根本的解决办法。

不过这样一改就有点不兼容了,比如新旧版本的broker之间无法建立连接,所以这个修改我一直没提交。

duhenglucky pushed a commit that referenced this issue Jan 20, 2022
…connection and return (#3016)

when slaveAckOffset greater than local commitLog offset, break connection and return
devfat pushed a commit to devfat/rocketmq that referenced this issue Mar 3, 2022
…break connection and return (apache#3016)

when slaveAckOffset greater than local commitLog offset, break connection and return
GenerousMan pushed a commit to GenerousMan/rocketmq that referenced this issue Aug 12, 2022
…break connection and return (apache#3016)

when slaveAckOffset greater than local commitLog offset, break connection and return
@github-actions
Copy link

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 github-actions bot added the stale label Sep 20, 2022
@github-actions
Copy link

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

carlvine500 pushed a commit to carlvine500/rocketmq-apache that referenced this issue Sep 10, 2024
…break connection and return (apache#3016)

when slaveAckOffset greater than local commitLog offset, break connection and return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants