Skip to content

Stop static group members after fencing - #674

Open
whatyouhide wants to merge 1 commit into
kafka4beam:masterfrom
whatyouhide:stop-fenced-static-member
Open

Stop static group members after fencing#674
whatyouhide wants to merge 1 commit into
kafka4beam:masterfrom
whatyouhide:stop-fenced-static-member

Conversation

@whatyouhide

Copy link
Copy Markdown
Contributor

@zmstone I introduced a pretty nasty bug in my static membership work recently: when an instance gets fenched_instance_id, brod retries to connect. That creates a vicious cycle where the new instance that just joined with the same ID gets itself fenced. The two instances play cat and mouse and eventually cause a full group rebalance, the thing I meant to avoid in the first place with static membership.

A note: the reason this happened here even though we've been running this in prod for a while is that the changes we run in our brod fork are not identical. We had originally done some of these changes in broadway_kafka instead, and I backported them here (introducing this bug).

This PR fixes the bug by not retrying fenced_instance_id errors. That's what the Java client does too.

@zmstone

zmstone commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

the suggestion was made here:

#669 (comment)

i thought in such situation, the second client will first get fenced,
then continues to retry, until the other leaves/times-out.

i do not understand how it can cause the full group rebalance.

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.

2 participants