aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormrlolthe1st <mrlolthe1st@yandex-team.com>2023-03-01 12:06:15 +0300
committermrlolthe1st <mrlolthe1st@yandex-team.com>2023-03-01 12:06:15 +0300
commit650df46f0db19d6b44ba44db848126db67c2aa90 (patch)
tree28b365f482672996f56828d606ab39df5414948a
parentde0eefa792e2dfd25e12a888194d8248bba010f2 (diff)
downloadydb-650df46f0db19d6b44ba44db848126db67c2aa90.tar.gz
HTTPGateway bug: TKeyType in Download() uses 0 instead of offset
fix small bug in HTTPGateway
-rw-r--r--ydb/library/yql/providers/common/http_gateway/yql_http_gateway.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/ydb/library/yql/providers/common/http_gateway/yql_http_gateway.cpp b/ydb/library/yql/providers/common/http_gateway/yql_http_gateway.cpp
index 6e140a1eeb1..29a05254a61 100644
--- a/ydb/library/yql/providers/common/http_gateway/yql_http_gateway.cpp
+++ b/ydb/library/yql/providers/common/http_gateway/yql_http_gateway.cpp
@@ -703,8 +703,6 @@ private:
Allocated.erase(it);
}
- if (Await.empty() && Allocated.empty())
- Requests.clear();
}
if (easy) {
easy->Done(result, httpResponseCode);
@@ -722,8 +720,6 @@ private:
AllocatedSize = 0ULL;
Allocated.clear();
- if (Await.empty())
- Requests.clear();
}
const TIssue error(curl_multi_strerror(result));
@@ -758,14 +754,8 @@ private:
callback(TIssues{error});
return;
}
- const std::unique_lock lock(Sync);
- auto& entry = Requests[TKeyType(url, 0U, headers, data, retryPolicy)];
- if (const auto& easy = entry.lock())
- if (easy->AddCallback(callback))
- return;
auto easy = TEasyCurlBuffer::Make(InFlight, DownloadedBytes, UploadedBytes, std::move(url), TEasyCurl::EMethod::GET, std::move(data), std::move(headers), offset, sizeLimit, std::move(callback), retryPolicy ? retryPolicy->CreateRetryState() : nullptr, InitConfig, DnsGateway.GetDNSCurlList());
- entry = easy;
Await.emplace(std::move(easy));
Wakeup(sizeLimit);
}
@@ -823,7 +813,6 @@ private:
std::unordered_map<CURL*, TEasyCurl::TPtr> Allocated;
- std::unordered_map<TKeyType, TEasyCurlBuffer::TWeakPtr, TKeyHash> Requests;
std::priority_queue<std::pair<TInstant, TEasyCurlBuffer::TPtr>> Delayed;
std::mutex Sync;