Skip to content

Fetch or Commit ConsumeOffset may not use master broker firstly #3603

@lushilin

Description

@lushilin

BUG REPORT

  1. Please describe the issue you observed:
    image
    如果一组brokerSet的组成是master节点(brokerId=0), slave节点(brokerId=16),那么在hashMap遍历的时候,不一定会先遍历到master节点,因为hashMap的初始化capacity默认是16,0和16的hashcode % 16都为0,所以遍历的时候是不保序的。
    会导致在主节点存活的情况下,提交或者初始化拉取offset都从slave节点进行提交或者拉取。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions