MCPcopy Create free account
hub / github.com/apache/impala / RunThread

Method RunThread

be/src/kudu/rpc/acceptor_pool.cc:157–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157void AcceptorPool::RunThread() {
158 while (true) {
159 Socket new_sock;
160 Sockaddr remote;
161 VLOG(2) << "calling accept() on socket " << socket_.GetFd()
162 << " listening on " << bind_address_.ToString();
163 Status s = socket_.Accept(&new_sock, &remote, Socket::FLAG_NONBLOCKING);
164 if (!s.ok()) {
165 if (Release_Load(&closing_)) {
166 break;
167 }
168 KLOG_EVERY_N_SECS(WARNING, 1) << "AcceptorPool: accept failed: " << s.ToString()
169 << THROTTLE_MSG;
170 continue;
171 }
172 if (remote.is_ip()) {
173 s = new_sock.SetNoDelay(true);
174 if (!s.ok()) {
175 KLOG_EVERY_N_SECS(WARNING, 1) << "Acceptor with remote = " << remote.ToString()
176 << " failed to set TCP_NODELAY on a newly accepted socket: "
177 << s.ToString() << THROTTLE_MSG;
178 continue;
179 }
180 }
181 rpc_connections_accepted_->Increment();
182 messenger_->RegisterInboundSocket(&new_sock, remote);
183 }
184 VLOG(1) << "AcceptorPool shutting down.";
185}
186
187} // namespace rpc
188} // namespace kudu

Callers 1

StartMethod · 0.95

Calls 9

GetFdMethod · 0.80
AcceptMethod · 0.80
is_ipMethod · 0.80
SetNoDelayMethod · 0.80
Release_LoadFunction · 0.50
ToStringMethod · 0.45
okMethod · 0.45
IncrementMethod · 0.45
RegisterInboundSocketMethod · 0.45

Tested by

no test coverage detected