aboutsummaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/http
diff options
context:
space:
mode:
authorilnurkh <ilnurkh@yandex-team.com>2023-10-09 20:25:13 +0300
committerilnurkh <ilnurkh@yandex-team.com>2023-10-09 20:46:53 +0300
commit6ef6895772bc473a21252db8a2a9f4c1b179841c (patch)
treed02a2d6e7014703f915b4042d8648196847186a6 /yt/cpp/mapreduce/http
parentc9bb61f5c70bf0d4194b5d6285afc1e5447130e4 (diff)
downloadydb-6ef6895772bc473a21252db8a2a9f4c1b179841c.tar.gz
Y_VERIFY->Y_ABORT_UNLESS at ^yt
https://clubs.at.yandex-team.ru/arcadia/29404
Diffstat (limited to 'yt/cpp/mapreduce/http')
-rw-r--r--yt/cpp/mapreduce/http/helpers.cpp2
-rw-r--r--yt/cpp/mapreduce/http/http.cpp10
-rw-r--r--yt/cpp/mapreduce/http/http_client.cpp6
3 files changed, 9 insertions, 9 deletions
diff --git a/yt/cpp/mapreduce/http/helpers.cpp b/yt/cpp/mapreduce/http/helpers.cpp
index 233a565f20..8a5fe16138 100644
--- a/yt/cpp/mapreduce/http/helpers.cpp
+++ b/yt/cpp/mapreduce/http/helpers.cpp
@@ -53,7 +53,7 @@ static TString GetParametersDebugString(const THttpHeader& header)
TString TruncateForLogs(const TString& text, size_t maxSize)
{
- Y_VERIFY(maxSize > 10);
+ Y_ABORT_UNLESS(maxSize > 10);
if (text.empty()) {
static TString empty = "empty";
return empty;
diff --git a/yt/cpp/mapreduce/http/http.cpp b/yt/cpp/mapreduce/http/http.cpp
index d44b2638a0..c5c358c46c 100644
--- a/yt/cpp/mapreduce/http/http.cpp
+++ b/yt/cpp/mapreduce/http/http.cpp
@@ -101,9 +101,9 @@ private:
// if error has happend. This function tries to read error response
// in such cases.
void HandleWriteException() {
- Y_VERIFY(WriteError_ == nullptr);
+ Y_ABORT_UNLESS(WriteError_ == nullptr);
WriteError_ = std::current_exception();
- Y_VERIFY(WriteError_ != nullptr);
+ Y_ABORT_UNLESS(WriteError_ != nullptr);
try {
HttpRequest_->GetResponseStream();
} catch (const TErrorResponse &) {
@@ -774,7 +774,7 @@ size_t THttpResponse::DoRead(void* buf, size_t len)
if (read == 0 && len != 0) {
// THttpInput MUST return defined (but may be empty)
// trailers when it is exhausted.
- Y_VERIFY(HttpInput_.Trailers().Defined(),
+ Y_ABORT_UNLESS(HttpInput_.Trailers().Defined(),
"trailers MUST be defined for exhausted stream");
CheckTrailers(HttpInput_.Trailers().GetRef());
IsExhausted_ = true;
@@ -793,7 +793,7 @@ size_t THttpResponse::DoSkip(size_t len)
if (skipped == 0 && len != 0) {
// THttpInput MUST return defined (but may be empty)
// trailers when it is exhausted.
- Y_VERIFY(HttpInput_.Trailers().Defined(),
+ Y_ABORT_UNLESS(HttpInput_.Trailers().Defined(),
"trailers MUST be defined for exhausted stream");
CheckTrailers(HttpInput_.Trailers().GetRef());
IsExhausted_ = true;
@@ -964,7 +964,7 @@ THttpResponse* THttpRequest::GetResponseStream()
if (!Input) {
SocketInput.Reset(new TSocketInput(*Connection->Socket.Get()));
if (TConfig::Get()->UseAbortableResponse) {
- Y_VERIFY(!Url_.empty());
+ Y_ABORT_UNLESS(!Url_.empty());
Input.Reset(new TAbortableHttpResponse(SocketInput.Get(), RequestId, HostName, Url_));
} else {
Input.Reset(new THttpResponse(SocketInput.Get(), RequestId, HostName));
diff --git a/yt/cpp/mapreduce/http/http_client.cpp b/yt/cpp/mapreduce/http/http_client.cpp
index a2af1182dc..6dc24c6ef2 100644
--- a/yt/cpp/mapreduce/http/http_client.cpp
+++ b/yt/cpp/mapreduce/http/http_client.cpp
@@ -226,7 +226,7 @@ public:
CheckErrorResponse(Context_.HostName, Context_.RequestId, Response_);
if (TConfig::Get()->UseAbortableResponse) {
- Y_VERIFY(!Context_.Url.empty());
+ Y_ABORT_UNLESS(!Context_.Url.empty());
Stream_ = std::make_unique<TAbortableCoreHttpResponse>(std::move(stream), Context_.Url);
} else {
Stream_ = std::move(stream);
@@ -423,9 +423,9 @@ private:
// if error has happend. This function tries to read error response
// in such cases.
void HandleWriteException() {
- Y_VERIFY(WriteError_ == nullptr);
+ Y_ABORT_UNLESS(WriteError_ == nullptr);
WriteError_ = std::current_exception();
- Y_VERIFY(WriteError_ != nullptr);
+ Y_ABORT_UNLESS(WriteError_ != nullptr);
try {
HttpRequest_->FinishWithError()->GetResponseStream();
} catch (const TErrorResponse &) {