Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/22882 )

Change subject: [socket] Fix test failure caused due to unsupported socket 
option
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/22882/3/src/kudu/master/mini_master.cc
File src/kudu/master/mini_master.cc:

http://gerrit.cloudera.org:8080/#/c/22882/3/src/kudu/master/mini_master.cc@61
PS3, Line 61:   opts_.rpc_opts.rpc_reuseport = FLAGS_rpc_reuseport;
> There is one more reason that flag makes sense. This setting is applied per
Thank you for elaborating on this!  Now I see that we didn't have a consistent 
approach w.r.t. using the --rpc_reuseport flag and RpcServerOptions in our test 
scaffolding.  For some reason, I thought the situation was much better, but I 
was mistaken.  And TestConnectViaUnixSocket is where the inconsistency becomes 
apparent, IIUC.

I agree it makes sense to resort to something similar you proposed for 
server_base.cc, but I'd rather vote doing so in the code that is specific to 
the test scaffolding itself.

What to do think if introducing an update like below into the MiniMaster's 
constructor?

--- a/src/kudu/master/mini_master.cc
+++ b/src/kudu/master/mini_master.cc
@@ -45,6 +45,7 @@ using std::vector;
 using strings::Substitute;

 DECLARE_bool(enable_minidumps);
+DECLARE_bool(rpc_listen_on_unix_domain_socket);
 DECLARE_bool(rpc_server_allow_ephemeral_ports);

 namespace kudu {
@@ -57,7 +58,10 @@ MiniMaster::MiniMaster(string fs_root, HostPort 
rpc_bind_addr, int num_data_dirs
   FLAGS_enable_minidumps = false;
   HostPort web_bind_addr(rpc_bind_addr_.host(), /*port=*/ 0);
   opts_.rpc_opts.rpc_bind_addresses = rpc_bind_addr_.ToString();
-  opts_.rpc_opts.rpc_reuseport = true;
+  // A MiniMaster enables SO_REUSEPORT on its RPC socket to simplify operation
+  // of multi-master mini-clusters, but the SO_REUSEPORT option isn't 
applicable
+  // for Unix domain sockets.
+  opts_.rpc_opts.rpc_reuseport = !FLAGS_rpc_listen_on_unix_domain_socket;
   opts_.webserver_opts.bind_interface = web_bind_addr.host();
   opts_.webserver_opts.port = web_bind_addr.port();
   opts_.set_block_cache_metrics_policy(Cache::ExistingMetricsPolicy::kKeep);



--
To view, visit http://gerrit.cloudera.org:8080/22882
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ice00b1c4fd1df78fa84c3dd2a79c968a4a91cc21
Gerrit-Change-Number: 22882
Gerrit-PatchSet: 3
Gerrit-Owner: Ashwani Raina <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Ashwani Raina <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Thu, 29 May 2025 17:56:03 +0000
Gerrit-HasComments: Yes

Reply via email to