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

RoundRobin assignor question #3159

Closed
plachor opened this issue Nov 24, 2020 · 8 comments
Closed

RoundRobin assignor question #3159

plachor opened this issue Nov 24, 2020 · 8 comments
Milestone

Comments

@plachor
Copy link

plachor commented Nov 24, 2020

Hi, I'm experiencing not well balanced partition assignments (with round-robin assignor selected). My issue is that partitions from topic 'A' are not properly distributed among all group members with active subscription to topic 'A'. This happens if in consumer group there are mixed subscriptions like:

memeber-1: 'A'
memeber-2: 'A'
memeber-3: 'B'
memeber-4: 'B','C'

I've been looking for an issue on my side without any luck so far. So I checked your implementation on Github and I wonder if on:
https://github.com/edenhill/librdkafka/blob/55995b9afed08dc33a0da0c161507fa429f10322/src/rdkafka_roundrobin_assignor.c#L87-L92
this modulo should not take members count instead? I might been misunderstanding it as I have not opened this code yet in any IDE and it been years since I written any thing in c++.

@edenhill
Copy link
Contributor

Huhm, yes, or that we iterate eligible_topic->members instead.

@plachor
Copy link
Author

plachor commented Nov 24, 2020

Good at least we know now were is the issue :) we had like 5 instance subscribing topic 'A' and all 45 partitions assigned to single instance

@plachor
Copy link
Author

plachor commented Nov 24, 2020

Could it lead to infinite loop also if not lucky in first range ( limited by this module ) ?

@edenhill
Copy link
Contributor

Seems like that, yeah.

I'll fix it.

@edenhill edenhill added this to the v1.6.0 milestone Nov 24, 2020
edenhill added a commit that referenced this issue Nov 24, 2020
The roundrobin partition assignment strategy could get stuck in an
endless loop or generate uneven assignments in case the group members
had asymmetric subscriptions (e.g., c1 subscribes to t1,t2 while c2
subscribes to t2,t3).
edenhill added a commit that referenced this issue Nov 25, 2020
The roundrobin partition assignment strategy could get stuck in an
endless loop or generate uneven assignments in case the group members
had asymmetric subscriptions (e.g., c1 subscribes to t1,t2 while c2
subscribes to t2,t3).
@plachor
Copy link
Author

plachor commented Dec 1, 2020

hi, @edenhill could you pre-release this hot-fix? I believe that I falling in too this endless loop after update to 1.5.2, and 1.5.2 addresses earlier issues found in round-robin #3024.

@edenhill
Copy link
Contributor

edenhill commented Dec 1, 2020

@plachor I'll roll a v1.5.3 maintenance release this week

edenhill added a commit that referenced this issue Dec 1, 2020
The roundrobin partition assignment strategy could get stuck in an
endless loop or generate uneven assignments in case the group members
had asymmetric subscriptions (e.g., c1 subscribes to t1,t2 while c2
subscribes to t2,t3).
@plachor
Copy link
Author

plachor commented Dec 2, 2020

Thanks ;)

@edenhill
Copy link
Contributor

edenhill commented Dec 9, 2020

v1.5.3 is now released

@edenhill edenhill closed this as completed Dec 9, 2020
edenhill added a commit that referenced this issue Dec 10, 2020
The roundrobin partition assignment strategy could get stuck in an
endless loop or generate uneven assignments in case the group members
had asymmetric subscriptions (e.g., c1 subscribes to t1,t2 while c2
subscribes to t2,t3).
edenhill added a commit that referenced this issue Dec 10, 2020
The roundrobin partition assignment strategy could get stuck in an
endless loop or generate uneven assignments in case the group members
had asymmetric subscriptions (e.g., c1 subscribes to t1,t2 while c2
subscribes to t2,t3).
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

No branches or pull requests

2 participants