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

Method RetryRpcRecv

be/src/runtime/client-cache.h:332–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330 /// This is safe if and only if DoRpc() returned RPC_RECV_TIMEOUT.
331 template <class F, class Response>
332 Status RetryRpcRecv(const F& recv_func, Response* response) {
333 DCHECK(response != NULL);
334 DCHECK(client_is_unrecoverable_);
335 try {
336 (client_->*recv_func)(*response);
337 } catch (const apache::thrift::transport::TTransportException& e) {
338 if (IsReadTimeoutTException(e)) {
339 return RecvTimeoutStatus(typeid(*response).name());
340 }
341 // If it's not timeout exception, then the connection is broken, stop retrying.
342 return GeneralErrorStatus(e, typeid(*response).name(), true);
343 } catch (const apache::thrift::TException& e) {
344 return GeneralErrorStatus(e, typeid(*response).name(), true);
345 }
346 client_is_unrecoverable_ = false;
347 return Status::OK();
348 }
349
350 private:
351 ClientCache<T>* client_cache_;

Callers

nothing calls this directly

Calls 3

IsReadTimeoutTExceptionFunction · 0.85
OKFunction · 0.85
nameMethod · 0.45

Tested by

no test coverage detected