apache / apache/rocketmq

[Bug] LmqConsumerOffsetManager is not updated in enableSlaveActingMaster mode

Open
#9,711 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
22.6k
Forks
12k
Avg merge
2d 20h
Merged PRs (30d)
26

Description

### Before Creating the Bug Report

- [x] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq/discussions).

- [x] I have searched the [GitHub Issues](https://github.com/apache/rocketmq/issues) and [GitHub Discussions](https://github.com/apache/rocketmq/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

centos7

### RocketMQ version

5.3.3

### JDK Version

1.8

### Describe the Bug

主从模式下,启用enableSlaveActingMaster ,当master宕机后,客户端会从slave拉取消息并提交位点。
当master恢复后,会通过preOnline流程,反向同步slave的部分数据,包括消费进度。

在brokerController初始化中,dateVersion没有被更新,会导致master的版本一直领先slave,master无法同步到最新的消费进度

Image

实际使用的

Image
应该使用的

Image

Image

### Steps to Reproduce

1.启动1主1从
2,发送10条消息
3.kill master节点
4.从slave消费
5.启动master,查看消费进度

### What Did You Expect to See?

master同步到最新消费进度

### What Did You See Instead?

master没有同步消费进度

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.