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

Avoid duplicated disconnecting producer when after add entry failed. #11741

Merged

Commits on Aug 22, 2021

  1. Avoid duplicated disconnecting producer when after add entry failed.

    ### Motivation
    
    Currently, if encounter the add entry failure, will call producer.disconnect() multiple times during the disconnecting the producer
    which will add many disconnect producer tasks to the EventLoop.
    
    ### Changes
    
    1. Added isDisconnecting state for the producer, if the producer in isDisconnecting state, skip the disconnect operation
    2. Create new future list only the topic have producers to reduce the heap allocation
    
    ### Verify
    
    Added test to cover disconnecting the producer multiple times, but the EventLoop only execute one time.
    codelipenghui committed Aug 22, 2021
    Copy the full SHA
    125c3a3 View commit details
    Browse the repository at this point in the history