You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by GitBox <gi...@apache.org> on 2021/02/12 15:27:34 UTC
[GitHub] [thrift] emmenlau opened a new pull request #2327: THRIFT-5187: Added Win32 support for domain sockets (AF_UNIX)
emmenlau opened a new pull request #2327:
URL: https://github.com/apache/thrift/pull/2327
This PR adds support for domain sockets for Windows.
It is a follow-up of #2127 because the former ran into a timeout and can no be reopened (due to https://github.com/isaacs/github/issues/361).
In order to implement this change I've changed a basic property of C++ build configuration for Windows. This would not be strictly required but is quite helpful. Domain sockets are only available on recent versions of the Windows platform SDK. Therefore I've enabled the automatic configuration of `config.h` with cmake. I've checked the results and on my platform(s) the generated config header is sensible and matches the hard-coded default. However this change is not easily portable to autotools.
During the implementation I found a number of minor issues in TServerSocket and TSocket that I believe are improved in this PR. None of these changes should be a breaking change. Mostly some methods should not be called on a domain socket and have been excluded. Also, the variable `listening_` was set to `true` at the beginning of the `listen()` method but I found that this opens a small time window where `listening_` is true but the socket is not actually listening (yet).
Please review and let me know if there is anything to discuss?
I've tested this implementation successfully on MSVC 2017 and 2019, on Ubuntu 18.04 x86_64 and on MacOS 14 with XCode 11.3.
- [x] I created Apache Jira Ticket https://issues.apache.org/jira/browse/THRIFT-5187
- [x] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
- [x] Did you squash your changes to a single commit? (not required, but preferred)
- [x] Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"?
- [x] If your change does not involve any code, add ` [skip ci]` at the end of your pull request to free up build resources.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [thrift] emmenlau commented on pull request #2327: THRIFT-5187: Added Win32 support for domain sockets (AF_UNIX)
Posted by GitBox <gi...@apache.org>.
emmenlau commented on pull request #2327:
URL: https://github.com/apache/thrift/pull/2327#issuecomment-832487087
Rebased on latest master.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [thrift] emmenlau merged pull request #2327: THRIFT-5187: Added Win32 support for domain sockets (AF_UNIX)
Posted by GitBox <gi...@apache.org>.
emmenlau merged pull request #2327:
URL: https://github.com/apache/thrift/pull/2327
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@thrift.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [thrift] emmenlau commented on pull request #2327: THRIFT-5187: Added Win32 support for domain sockets (AF_UNIX)
Posted by GitBox <gi...@apache.org>.
emmenlau commented on pull request #2327:
URL: https://github.com/apache/thrift/pull/2327#issuecomment-910087723
Remaining build errors are unrelated. Merging.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [thrift] emmenlau commented on pull request #2327: THRIFT-5187: Added Win32 support for domain sockets (AF_UNIX)
Posted by GitBox <gi...@apache.org>.
emmenlau commented on pull request #2327:
URL: https://github.com/apache/thrift/pull/2327#issuecomment-832489384
Would someone be willing to review? I think this PR should be relatively self-contained, so it should not harm the existing functionality. It adds support for Un*x domain sockets on Windows, which can be an interesting use case.
For the review, I recommend reviewing the two commits individually. The first one (adding new method `isUnixDomainSocket()`) is a trivial change. The second commit has the functional improvements but is comparably smaller when reviewed individually.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org