diff options
author | hiddenpath <hiddenpath@yandex-team.com> | 2024-12-23 20:46:15 +0300 |
---|---|---|
committer | hiddenpath <hiddenpath@yandex-team.com> | 2024-12-23 21:53:32 +0300 |
commit | ad3ee191a136a9a4a27859cb4ef741a4091ca459 (patch) | |
tree | 1da82de6fdfd1a12b746798651077f4c287ff311 | |
parent | 8f060c9c954d9159c92baafcc0466fef6680c399 (diff) | |
download | ydb-ad3ee191a136a9a4a27859cb4ef741a4091ca459.tar.gz |
Fix empty response getting status code
commit_hash:298b614a4fddd4647e44e230448db1abf61569a3
-rw-r--r-- | yt/cpp/mapreduce/client/client.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yt/cpp/mapreduce/client/client.cpp b/yt/cpp/mapreduce/client/client.cpp index 10712e319a..9fcb82f5b7 100644 --- a/yt/cpp/mapreduce/client/client.cpp +++ b/yt/cpp/mapreduce/client/client.cpp @@ -1356,14 +1356,14 @@ TNode::TListType TClient::SkyShareTable( // As documented at https://wiki.yandex-team.ru/yt/userdoc/blob_tables/#shag3.sozdajomrazdachu // first request returns HTTP status code 202 (Accepted). And we need retrying until we have 200 (OK). NHttpClient::IHttpResponsePtr response; - while (response->GetStatusCode() != 200) { + do { response = RequestWithRetry<NHttpClient::IHttpResponsePtr>( ClientRetryPolicy_->CreatePolicyForGenericRequest(), [this, &tablePaths, &options] (TMutationId /*mutationId*/) { return RawClient_->SkyShareTable(tablePaths, options); }); TWaitProxy::Get()->Sleep(TDuration::Seconds(5)); - } + } while (response->GetStatusCode() != 200); if (options.KeyColumns_) { return NodeFromJsonString(response->GetResponse())["torrents"].AsList(); |