linkedin / linkedin/kafka-tools

IndexError: list index out of range

Open
#111 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
599
Forks
145
PR merge metrics
No merged PRs in 30d

Description

https://github.com/linkedin/kafka-tools/blob/0d98bbefc1105851b7b7203de4f6c68d9c097730/kafka/tools/assigner/actions/reorder.py#L51

partition.replicas[0] throws IndexError. Should be checked for null or empty before the index is referred

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at kafka/tools/assigner/actions/reorder.py line 51 and inspect how partition.replicas is used. Reproduce or trace the path where replicas is null or empty, then verify that the reorder action no longer raises IndexError when that condition occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
kafka, python
Domain
data-engineering, distributed-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.