Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rhythm: fail safe when no partitions are assigned to a blockbuilder instance #4743

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

javiermolinar
Copy link
Contributor

@javiermolinar javiermolinar commented Feb 24, 2025

What this PR does:
Handle gracefully when a block-builder is initialized and it has no partitions assigned.

It also relies on the existing ring partition Ids to connect on instead of just looking on the number of active partitions

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@javiermolinar javiermolinar changed the title rythm: fail safe when no partitions are assigned to a blockbuilder instance rhythm: fail safe when no partitions are assigned to a blockbuilder instance Feb 24, 2025
Copy link
Member

@mapno mapno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getAssignedActivePartitions also needs to be fixed. That function assumes that if there are 5 instances in the partition ring, partitions 0, 1, 2, 3 and 4 are the ones active-which is not necessarily true, it can be any other existing partition in Kafka.

@javiermolinar javiermolinar requested a review from mapno February 25, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants