void AsyncSingleRequestRpcRetryingCaller::LocateThenCall()

in src/hbase/client/async-rpc-retrying-caller.cc [80:107]


void AsyncSingleRequestRpcRetryingCaller<RESP>::LocateThenCall() {
  int64_t locate_timeout_ns;
  if (operation_timeout_nanos_.count() > 0) {
    locate_timeout_ns = RemainingTimeNs();
    if (locate_timeout_ns <= 0) {
      CompleteExceptionally();
      return;
    }
  } else {
    locate_timeout_ns = -1L;
  }

  conn_->region_locator()
      ->LocateRegion(*table_name_, row_, locate_type_, locate_timeout_ns)
      .then([this](std::shared_ptr<RegionLocation> loc) { Call(*loc); })
      .onError([this](const exception_wrapper& e) {
        OnError(e,
                [this, e]() -> std::string {
                  return "Locate '" + row_ + "' in " + table_name_->namespace_() + "::" +
                         table_name_->qualifier() + " failed with e.what()=" +
                         e.what().toStdString() + ", tries = " + std::to_string(tries_) +
                         ", maxAttempts = " + std::to_string(max_attempts_) + ", timeout = " +
                         TimeUtil::ToMillisStr(operation_timeout_nanos_) + " ms, time elapsed = " +
                         TimeUtil::ElapsedMillisStr(this->start_ns_) + " ms";
                },
                [](const exception_wrapper& error) {});
      });
}