[Proxy] Remove unnecessary Pulsar Client usage from Pulsar Proxy#13836
Merged
lhotari merged 1 commit intoJan 19, 2022
Merged
Conversation
lhotari
requested review from
Technoboy-,
addisonj,
codelipenghui,
eolivelli,
hezhangjian,
merlimat and
michaeljmarshall
January 19, 2022 11:22
|
@lhotari:Thanks for your contribution. For this PR, do we need to update docs? |
hezhangjian
approved these changes
Jan 19, 2022
|
@lhotari:Thanks for providing doc info! |
1 task
lhotari
added a commit
to lhotari/pulsar
that referenced
this pull request
Feb 9, 2022
…che#13836) (cherry picked from commit 324aa1b)
lhotari
added a commit
that referenced
this pull request
Feb 9, 2022
) (cherry picked from commit 324aa1b)
lhotari
added a commit
to datastax/pulsar
that referenced
this pull request
Feb 9, 2022
…che#13836) (cherry picked from commit 324aa1b) (cherry picked from commit 25e6b65) (cherry picked from commit 94fd1f5)
lhotari
added a commit
to datastax/pulsar
that referenced
this pull request
Feb 9, 2022
…che#13836) (cherry picked from commit 324aa1b) (cherry picked from commit 25e6b65)
15 tasks
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Pulsar Proxy will create a new Pulsar Client instance for every proxied connection.
Currently 2 threads will be created for every Pulsar Client instance for the internal/IO and external/listener executors. This causes a lot of overhead and inefficiency in the Pulsar Proxy.
It turns out that the PulsarClientImpl instance is unnecessary in Pulsar Proxy. The Proxy code doesn't need the instance at all and therefore it can be removed.
While working on the changes, it was noticed that the ConnectionPool cleanup code is wrong. It is closing the EventLoopGroup provided to the ConnectionPool although ConnectionPool doesn't create this resource. In addition, closing didn't close existing connections.
Additional context
This PR replaces PR #13834
Modifications