[22056] Fix TCP discovery server locators translation (backport #5382) #5410
+99
−10
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.
Description
This PR is a partial backport of #5382, which fixes a bug where a TCP client connecting to
localhost
is unable to identify the locator of a TCP discovery server with a custom GUID listening onany
. This causes the client to create two different channels for the same connection, where the latest can never be reached. The reason is that the server's locator is not considered from the same host due to its custom GUID. Hence, the server transforms the client's locator intolocalhost
but the client does not do the same with the server's locator.The proposed fix is to create a new entry into the
channel_resources_
map for each local interface available. In this way, every locator with local address will reuse the same TCP channel, instead of creating a new one. Any new attempt of creating a new channel will be rejected by the server if the address was previously added.@Mergifyio backport 3.0.x 2.14.x 2.10.x
Contributor Checklist
versions.md
file (if applicable).Reviewer Checklist