| 390 | } |
| 391 | |
| 392 | Status CatalogOpExecutor::GetPartialCatalogObject( |
| 393 | const TGetPartialCatalogObjectRequest& req, |
| 394 | TGetPartialCatalogObjectResponse* resp) { |
| 395 | DCHECK(FLAGS_use_local_catalog || TestInfo::is_test()); |
| 396 | if (FLAGS_inject_latency_before_catalog_fetch_ms > 0) { |
| 397 | SleepForMs(FLAGS_inject_latency_before_catalog_fetch_ms); |
| 398 | } |
| 399 | // Non-table requests are lightweight requests that won't be blocked by table loading |
| 400 | // or table locks. Note that when loading table list of a db, the type is DB. |
| 401 | auto client_cache_ptr = (req.object_desc.type == TCatalogObjectType::TABLE) ? |
| 402 | env_->catalogd_client_cache() : env_->catalogd_lightweight_req_client_cache(); |
| 403 | int attempt = 0; // Used for debug action only. |
| 404 | CatalogServiceConnection::RpcStatus rpc_status = |
| 405 | CatalogServiceConnection::DoRpcWithRetry(client_cache_ptr, |
| 406 | *ExecEnv::GetInstance()->GetCatalogdAddress().get(), |
| 407 | &CatalogServiceClientWrapper::GetPartialCatalogObject, req, |
| 408 | FLAGS_catalog_client_connection_num_retries, |
| 409 | FLAGS_catalog_client_rpc_retry_interval_ms, |
| 410 | [&attempt]() { return CatalogRpcDebugFn(&attempt); }, resp); |
| 411 | RETURN_IF_ERROR(rpc_status.status); |
| 412 | if (FLAGS_inject_latency_after_catalog_fetch_ms > 0) { |
| 413 | SleepForMs(FLAGS_inject_latency_after_catalog_fetch_ms); |
| 414 | } |
| 415 | if (FLAGS_inject_failure_ratio_in_catalog_fetch > 0 |
| 416 | && rand() < FLAGS_inject_failure_ratio_in_catalog_fetch * (RAND_MAX + 1L)) { |
| 417 | resp->lookup_status = CatalogLookupStatus::TABLE_NOT_LOADED; |
| 418 | } |
| 419 | return Status::OK(); |
| 420 | } |
| 421 | |
| 422 | |
| 423 | Status CatalogOpExecutor::PrioritizeLoad(const TPrioritizeLoadRequest& req, |
nothing calls this directly
no test coverage detected