Skip to content

slaveReadEnable=true not work When cluster deployed on DLedger mode sometimes[Followed #2157] #2165

@maixiaohai

Description

@maixiaohai

The issue tracker is ONLY used for bug report(feature request need to follow RIP process). Keep in mind, please check whether there is an existing same report before your raise a new one.

Alternately (especially if your communication is not a bug report), you can send mail to our mailing lists. We welcome any friendly suggestions, bug fixes, collaboration and other improvements.

Please ensure that your bug report is clear and that it is complete. Otherwise, we may be unable to understand it or to reproduce it, either of which would prevent us from fixing the bug. We strongly recommend the report(bug report or feature request) could include some hints as the following:

BUG REPORT

  1. Please describe the issue you observed:
  • What did you do (The steps to reproduce)?
    Start cluster deployed on DLedger mode and broker config slaveReadEnable=true.

  • What did you expect to see?
    When I started consumer to consume some history record which should be suggest consume from slave,
    I think the consumer will pull messages from follower node.

  • What did you see instead?
    I found consumer still pull messages from leader node.

  1. Please tell us about your environment:
    env
version:4.7.0
jdk 8
centos 7

some broker conf

listenPort=30911
brokerClusterName=c4tst-rocketmq-fusion
enableDLegerCommitLog=true
sendMessageThreadPoolNums=128
slaveReadEnable=true
useReentrantLockWhenPutMessage=true
transferMsgByHeap=true
  1. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
    the root cause is brokerId 1 not exist when node n0 is voted as leader. The broker id will be 0, 2, 3.
  • read from slave case, left is a follower(n0) and right is the leader(n1)
    image

  • read from master case,left is a leader(n0) and right is the follower(n1)
    image

  • When I fixed the bug, read from slave case,left is a leader(n0) and right is the follower(n1)
    image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions