diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-11-20 11:14:58 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-11-20 11:14:58 +0000 |
commit | 31773f157bf8164364649b5f470f52dece0a4317 (patch) | |
tree | 33d0f7eef45303ab68cf08ab381ce5e5e36c5240 /yt/cpp/mapreduce/http/abortable_http_response.cpp | |
parent | 2c7938962d8689e175574fc1e817c05049f27905 (diff) | |
parent | eff600952d5dfe17942f38f510a8ac2b203bb3a5 (diff) | |
download | ydb-31773f157bf8164364649b5f470f52dece0a4317.tar.gz |
Merge branch 'rightlib' into mergelibs-241120-1113
Diffstat (limited to 'yt/cpp/mapreduce/http/abortable_http_response.cpp')
-rw-r--r-- | yt/cpp/mapreduce/http/abortable_http_response.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/yt/cpp/mapreduce/http/abortable_http_response.cpp b/yt/cpp/mapreduce/http/abortable_http_response.cpp index 9da9241d33..995bb9de4c 100644 --- a/yt/cpp/mapreduce/http/abortable_http_response.cpp +++ b/yt/cpp/mapreduce/http/abortable_http_response.cpp @@ -14,20 +14,20 @@ public: { auto g = Guard(Lock_); auto id = NextId_++; - IdToOutage.emplace(id, TOutageEntry{std::move(urlPattern), options.ResponseCount_, options.LengthLimit_}); + IdToOutage_.emplace(id, TOutageEntry{std::move(urlPattern), options.ResponseCount_, options.LengthLimit_}); return id; } void StopOutage(TOutageId id) { auto g = Guard(Lock_); - IdToOutage.erase(id); + IdToOutage_.erase(id); } void Add(IAbortableHttpResponse* response) { auto g = Guard(Lock_); - for (auto& [id, entry] : IdToOutage) { + for (auto& [id, entry] : IdToOutage_) { if (entry.Counter > 0 && response->GetUrl().find(entry.Pattern) != TString::npos) { response->SetLengthLimit(entry.LengthLimit); entry.Counter -= 1; @@ -70,7 +70,7 @@ private: private: TOutageId NextId_ = 0; TIntrusiveList<IAbortableHttpResponse> ResponseList_; - THashMap<TOutageId, TOutageEntry> IdToOutage; + THashMap<TOutageId, TOutageEntry> IdToOutage_; TMutex Lock_; }; @@ -137,11 +137,10 @@ bool TAbortableHttpResponseBase::IsAborted() const //////////////////////////////////////////////////////////////////////////////// TAbortableHttpResponse::TAbortableHttpResponse( + TRequestContext context, IInputStream* socketStream, - const TString& requestId, - const TString& hostName, const TString& url) - : THttpResponse(socketStream, requestId, hostName) + : THttpResponse(std::move(context), socketStream) , TAbortableHttpResponseBase(url) { } |