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

KAFKA-6541: Fixed a StackOverflow bug in kafka-coordinator-heartbeat-thread #4548

Closed
wants to merge 1 commit into from
Closed

KAFKA-6541: Fixed a StackOverflow bug in kafka-coordinator-heartbeat-thread #4548

wants to merge 1 commit into from

Conversation

anhldbk
Copy link

@anhldbk anhldbk commented Feb 8, 2018

More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.

  • The bug is caused by infinite recursive calls to ConsumerNetworkClient.disconnect()

  • In class org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient, I introduced a boolean field named disconnecting to prevent such calls happen

    public void disconnect(Node node) {
        synchronized (this) {
            if(disconnecting){
                return;
            }
            disconnecting=true;
            failUnsentRequests(node, DisconnectException.INSTANCE);            

            client.disconnect(node.idString());
        }

        // We need to poll to ensure callbacks from in-flight requests on the disconnected socket are fired
        pollNoWakeup();
    }

Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.

No test to implement (I think this is a trivial fix)

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@anhldbk anhldbk changed the title KAFKA-6541: Fix a StackOverflow bug in kafka-coordinator-heartbeat-thread KAFKA-6541: Fixed a StackOverflow bug in kafka-coordinator-heartbeat-thread Feb 8, 2018
@ijuma ijuma requested a review from hachikuji February 8, 2018 12:19
@hachikuji
Copy link
Contributor

This should already be fixed. I left a comment on the JIRA.

@hachikuji
Copy link
Contributor

Closing this since it was already fixed. Please reopen the JIRA if you believe the issue has not been addressed.

@hachikuji hachikuji closed this Feb 15, 2018
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