diff options
author | babenko <babenko@yandex-team.com> | 2025-01-20 22:31:49 +0300 |
---|---|---|
committer | babenko <babenko@yandex-team.com> | 2025-01-20 22:58:44 +0300 |
commit | 9f98506ce978ce6089f181c6e70383535f4582ad (patch) | |
tree | 7a18859d0fe8d68dafa73732e9b68689a0df535e | |
parent | ba8802c519f747abd71c9009882115c87be2ecae (diff) | |
download | ydb-9f98506ce978ce6089f181c6e70383535f4582ad.tar.gz |
Make MaxFragmentsPerWrite_ an int
commit_hash:30fc008df7398c9566e17817d194fecd3c44a809
-rw-r--r-- | yt/yt/core/bus/tcp/connection.cpp | 4 | ||||
-rw-r--r-- | yt/yt/core/bus/tcp/connection.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/yt/yt/core/bus/tcp/connection.cpp b/yt/yt/core/bus/tcp/connection.cpp index 6807a9d8d4..a357e9199d 100644 --- a/yt/yt/core/bus/tcp/connection.cpp +++ b/yt/yt/core/bus/tcp/connection.cpp @@ -1474,7 +1474,7 @@ bool TTcpConnection::WriteFragments(size_t* bytesWritten) size_t bytesAvailable = MaxBatchWriteSize; while (fragmentIt != fragmentEnd && - SendVector_.size() < MaxFragmentsPerWrite_ && + std::ssize(SendVector_) < MaxFragmentsPerWrite_ && bytesAvailable > 0) { const auto& fragment = *fragmentIt; @@ -1598,7 +1598,7 @@ bool TTcpConnection::MaybeEncodeFragments() coalescedSize += fragment.Size(); }; - while (EncodedFragments_.size() < MaxFragmentsPerWrite_ && + while (std::ssize(EncodedFragments_) < MaxFragmentsPerWrite_ && encodedSize <= MaxBatchWriteSize && !QueuedPackets_.empty()) { diff --git a/yt/yt/core/bus/tcp/connection.h b/yt/yt/core/bus/tcp/connection.h index 3d5447263f..bc520f331a 100644 --- a/yt/yt/core/bus/tcp/connection.h +++ b/yt/yt/core/bus/tcp/connection.h @@ -282,7 +282,7 @@ private: NYTree::IAttributeDictionaryPtr PeerAttributes_; - size_t MaxFragmentsPerWrite_ = 256; + int MaxFragmentsPerWrite_ = 256; ILocalMessageHandlerPtr LocalBypassHandler_; IBusPtr LocalBypassReplyBus_; |