You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "romankarlstetter (via GitHub)" <gi...@apache.org> on 2023/09/13 06:31:35 UTC

[GitHub] [arrow] romankarlstetter opened a new pull request, #37689: GH-37673: [C++][Flight] Improve error message if binding port fails

romankarlstetter opened a new pull request, #37689:
URL: https://github.com/apache/arrow/pull/37689

   See https://github.com/apache/arrow/issues/37673 for more info.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-37673: [C++][Flight] Improve error message if binding port fails [arrow]

Posted by "romankarlstetter (via GitHub)" <gi...@apache.org>.
romankarlstetter commented on PR #37689:
URL: https://github.com/apache/arrow/pull/37689#issuecomment-1806153385

   Ok, I see. So it's probably the best idea to just leave it as is, right? --> I'm closing this.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-37673: [C++][Flight] Improve error message if binding port fails [arrow]

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on code in PR #37689:
URL: https://github.com/apache/arrow/pull/37689#discussion_r1380550244


##########
cpp/src/arrow/flight/transport/grpc/grpc_server.cc:
##########
@@ -572,7 +572,9 @@ class GrpcServerTransport : public internal::ServerTransport {
 
     const std::string scheme = uri.scheme();
     int port = 0;
-    if (scheme == kSchemeGrpc || scheme == kSchemeGrpcTcp || scheme == kSchemeGrpcTls) {
+    const bool isHostPortScheme =

Review Comment:
   The code style uses snake_case for non-constant variable names



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] lidavidm commented on a diff in pull request #37689: GH-37673: [C++][Flight] Improve error message if binding port fails

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on code in PR #37689:
URL: https://github.com/apache/arrow/pull/37689#discussion_r1324774633


##########
cpp/src/arrow/flight/transport/grpc/grpc_server.cc:
##########
@@ -598,7 +598,7 @@ class GrpcServerTransport : public internal::ServerTransport {
     } else if (scheme == kSchemeGrpcUnix) {
       std::stringstream address;
       address << "unix:" << uri.path();
-      builder.AddListeningPort(address.str(), ::grpc::InsecureServerCredentials());

Review Comment:
   Looks like this needs to be done above as well for the TLS branch



##########
cpp/src/arrow/flight/transport/grpc/grpc_server.cc:
##########
@@ -598,7 +598,7 @@ class GrpcServerTransport : public internal::ServerTransport {
     } else if (scheme == kSchemeGrpcUnix) {
       std::stringstream address;
       address << "unix:" << uri.path();
-      builder.AddListeningPort(address.str(), ::grpc::InsecureServerCredentials());

Review Comment:
   Plus, for domain sockets, port will still be 0 right?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-37673: [C++][Flight] Improve error message if binding port fails [arrow]

Posted by "romankarlstetter (via GitHub)" <gi...@apache.org>.
romankarlstetter commented on code in PR #37689:
URL: https://github.com/apache/arrow/pull/37689#discussion_r1345380040


##########
cpp/src/arrow/flight/transport/grpc/grpc_server.cc:
##########
@@ -598,7 +598,7 @@ class GrpcServerTransport : public internal::ServerTransport {
     } else if (scheme == kSchemeGrpcUnix) {
       std::stringstream address;
       address << "unix:" << uri.path();
-      builder.AddListeningPort(address.str(), ::grpc::InsecureServerCredentials());

Review Comment:
   The more specific message is now only used if the URI scheme is a host/port combination. I hope this logic corresponds to what you had in mind.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] lidavidm commented on a diff in pull request #37689: GH-37673: [C++][Flight] Improve error message if binding port fails

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on code in PR #37689:
URL: https://github.com/apache/arrow/pull/37689#discussion_r1341350582


##########
cpp/src/arrow/flight/transport/grpc/grpc_server.cc:
##########
@@ -598,7 +598,7 @@ class GrpcServerTransport : public internal::ServerTransport {
     } else if (scheme == kSchemeGrpcUnix) {
       std::stringstream address;
       address << "unix:" << uri.path();
-      builder.AddListeningPort(address.str(), ::grpc::InsecureServerCredentials());

Review Comment:
   This is an if/else. I think this change should only apply to the TCP socket-based schemes and not the domain socket, so the opposite of the current change.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-37673: [C++][Flight] Improve error message if binding port fails [arrow]

Posted by "romankarlstetter (via GitHub)" <gi...@apache.org>.
romankarlstetter closed pull request #37689: GH-37673: [C++][Flight] Improve error message if binding port fails
URL: https://github.com/apache/arrow/pull/37689


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] romankarlstetter commented on a diff in pull request #37689: GH-37673: [C++][Flight] Improve error message if binding port fails

Posted by "romankarlstetter (via GitHub)" <gi...@apache.org>.
romankarlstetter commented on code in PR #37689:
URL: https://github.com/apache/arrow/pull/37689#discussion_r1325714377


##########
cpp/src/arrow/flight/transport/grpc/grpc_server.cc:
##########
@@ -598,7 +598,7 @@ class GrpcServerTransport : public internal::ServerTransport {
     } else if (scheme == kSchemeGrpcUnix) {
       std::stringstream address;
       address << "unix:" << uri.path();
-      builder.AddListeningPort(address.str(), ::grpc::InsecureServerCredentials());

Review Comment:
   > Looks like this needs to be done above as well for the TLS branch
   
   Hm, I don't really get what you're referring to.
   
   
   
   
   
   > Plus, for domain sockets, port will still be 0 right?
   
   Yes, that's probably correct (however, I don't have any practical experience with domain sockets in this context).
   That would mean that adding the port here does not make sense in the first place and we would need to check below that `scheme != kSchemeGrpcUnix` for issuing that _port bind specific_ error message.
   
   What do you think?
   



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org