Skip to content

Broker重启后重复消费消息 #1440

@wenfei4

Description

@wenfei4

BUG REPORT

在主从模式下,将主从角色调换后,消费者消费到了历史消息(12小时之前的)。

  • 版本:4.2.0
  • 部署模式: 集群模式,共4台服务器b1-b4:
    • Broker A: MasterA(b1), SlaveA(b2)
    • Broker B: MasterB(b3), SlaveB(b4)
  • What did you do (The steps to reproduce)?
  1. shutdown MasterA(b1)
  2. wait for 30 minutes
  3. shutdown SlaveA(b2)
  4. modify b2 set brokerId=0
  5. restart b2(as Master)
  6. everything be ok
  7. after 12 hours, modify b1 set brokerId=1 and startup b1(as Slave)
  8. after b1 sync data from b2, shutdown b2
  9. wait for 5 minutes
  10. shutdown b1
  11. modify b1 set brokerId=0 and startup b1(as Master)
  12. then all consumers are consuming history messages(about 12 hours ago),and a lot of pressure on b1
  • What did you expect to see?

  • What did you see instead?

  1. Please tell us about your environment:

  2. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions