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

ISSUE-676: [BUG] When reconnecting to the server, the old connection is not closed #246

Open
sijie opened this issue Dec 1, 2021 · 0 comments

Comments

@sijie
Copy link
Member

sijie commented Dec 1, 2021

Original Issue: apache#676


Expected behavior

When reconnecting to the server, the old connection should be closed.

Actual behavior

When reconnecting to the server, the old connection is not closed.

The following log progresses according to the timeline:

  1. First, there is an active channel and producer that is writing data to the broker
    image

  2. In the case that the previous connection has not been disconnected, the client sends an add producer operation for the same producerName
    image

  3. This addition operation comes from the same ip of the client, a different port connection, and the producerName is equal to the previous one
    image

  4. Remove the producer in ServerCnx from the pulsar server, Producer getting producer busy is removing existing producer from list apache/pulsar#11804, this PR modified the equals method of the Producer, resulting in the inability to remove the producer from the topic's prodcuers map.
    image

  5. Then the old connection starts to be disconnected, and the producer status of the server on the connection is cleared
    image

image

  1. The new channel connection keeps retrying addProducer, and the producer is added successfully after closing the old connection.

Steps to reproduce

System configuration

Pulsar version: x.y

pulsar-client-go: 0.7.0
pulsar broker: 2.8.1

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

1 participant