ShannonDing opened a new issue, #5663:
URL: https://github.com/apache/rocketmq/issues/5663
**BUG REPORT**
1. Please describe the issue you observed:
- What did you do (The steps to reproduce)?
当前 SyncStateSet 变更的时候,由Master
Broker上报并且Controller成功应用后才会应用到本地,这保证了SyncStateSet收缩时不会有消息丢失。但是这无法保证SyncStateSet扩张时数据的一致性性,举一个例子
A为Master,B为Slave,一开始SyncStatetSet为{A},当B追上A时(slaveAckOffset >
confirmOffset),
SyncStateSet将从{A}变成{A,B},按照当前实现的逻辑,首先{A,B}要上报Controller成功应用后才会应用到本地,因此在上报Controller到Controller确认应用成功这段时间内,SyncStateSet仍然为{A},此时发送过来的消息只需要A确认即可返回成功,假设Controller成功应用上报的信息SyncStateSet为{A,B},但返回给A确认丢失,此时A下线,由于Controller中SyncStateSet为{A,B},B被选为主,那么就可能会出现消息丢失。

- What is expected to see?
- What did you see instead?
2. Please tell us about your environment:
3. Other information (e.g. detailed explanation, logs, related issues,
suggestions on how to fix, etc):
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]