Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Fix group id z-node not updated for the same client id#607

Merged
jiazhai merged 1 commit into
streamnative:masterfrom
BewareMyPower:bewaremypower/zk-exception
Jul 8, 2021
Merged

Fix group id z-node not updated for the same client id#607
jiazhai merged 1 commit into
streamnative:masterfrom
BewareMyPower:bewaremypower/zk-exception

Conversation

@BewareMyPower
Copy link
Copy Markdown
Collaborator

@BewareMyPower BewareMyPower commented Jul 7, 2021

Fixes #606

Motivation

If a consumer from the same machine subscribed the same topic with a different group id, the FIND_COORDINATOR request handler would fail to update the z-node for consumer metrics.

In another case, if a consumer from the same machine subscribed the same topic with the same group id again, the KoP side would print redundant error logs like #606.

Modification

  • If the z-node existed in ZooKeeperUtils#tryCreatePath, update the z-node's data instead of just printing an error log.
  • Add a unit test to verify group id can be updated successfully.

@BewareMyPower BewareMyPower requested a review from jiazhai as a code owner July 7, 2021 14:05
@BewareMyPower BewareMyPower self-assigned this Jul 7, 2021
@jiazhai jiazhai merged commit 18e2b38 into streamnative:master Jul 8, 2021
@BewareMyPower BewareMyPower deleted the bewaremypower/zk-exception branch July 8, 2021 03:43
BewareMyPower added a commit that referenced this pull request Jul 8, 2021
Fixes #606 

### Motivation

If a consumer from the same machine subscribed the same topic with a different group id, the `FIND_COORDINATOR` request handler would fail to update the z-node for consumer metrics.

In another case, if a consumer from the same machine subscribed the same topic with the same group id again, the KoP side would print redundant error logs like #606.

### Modification

- If the z-node existed in `ZooKeeperUtils#tryCreatePath`, update the z-node's data instead of just printing an error log.
- Add a unit test to verify group id can be updated successfully.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] kafka connect distributed mode not working properly

2 participants