fix(services/memcached): TCP address resolution#7701
Open
flip1995 wants to merge 1 commit into
Open
Conversation
PR apache#7112 added support for Unix sockets to the memcached backend. As a side effect, it switched the TCP address parsing from being done inside of `TcpStream::connect` to `SocketAddr::parse`. The major difference is that `SocketAddr::parse` cannot resolve addresses like `localhost:1234`, as it errors out if it sees non-octal numbers in the address. This seemed like an unintended breaking change to me. I also can't see the benefit of doing that, as `TcpStream::connect` already calls `to_socket_addrs` internally.
Author
|
Both of those CI failures seem unrelated to this PR. |
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.
Which issue does this PR close?
PR #7112 added support for Unix sockets to the memcached backend. As a side effect, it switched the TCP address parsing from being done inside of
TcpStream::connecttoSocketAddr::parse. The major difference is thatSocketAddr::parsecannot resolve addresses likelocalhost:1234, as it errors out if it sees non-octal numbers in the address.I didn't create an issue, but can do so if required.
cc @zenyanle @tisonkun
Rationale for this change
#7112 claimed:
But it broke TCP configurations like
tcp://localhost:11211.So, this seemed like an unintended breaking change to me. I also can't see the benefit of doing that, as
TcpStream::connectalready callsto_socket_addrsinternally.What changes are included in this PR?
Remove the additional and more restrictive
SocketAddrparsing.Are there any user-facing changes?
This restores the behavior from before the 0.56.0 release. This is required to bump the opendal dependency in
sccache:which fixes a transitive GCS issue that was fixed in opendal in version 0.56.0:
AI Usage Statement
I used Gemini to find the PR #7112 that introduced this change, but came up and implemented the fix myself.