From 092884739888fdf4688e9273310f587e037ac07d Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 6 Feb 2025 12:29:25 +0100 Subject: Rename kMaxBatchTransferSize to MessageLimits::kMaxGrpcLength --- src/buildtool/execution_api/common/common_api.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/buildtool/execution_api/common/common_api.cpp') diff --git a/src/buildtool/execution_api/common/common_api.cpp b/src/buildtool/execution_api/common/common_api.cpp index 69cd86fb..47542bc0 100644 --- a/src/buildtool/execution_api/common/common_api.cpp +++ b/src/buildtool/execution_api/common/common_api.cpp @@ -214,7 +214,7 @@ auto UpdateContainerAndUpload( // that we never store unnecessarily more data in the container than we need // per remote transfer. try { - if (blob.data->size() > kMaxBatchTransferSize) { + if (blob.data->size() > MessageLimits::kMaxGrpcLength) { // large blobs use individual stream upload if (not uploader( std::unordered_set{{std::move(blob)}})) { @@ -228,7 +228,8 @@ auto UpdateContainerAndUpload( content_size += blob.data->size(); } - if (content_size + blob.data->size() > kMaxBatchTransferSize) { + if (content_size + blob.data->size() > + MessageLimits::kMaxGrpcLength) { // swap away from original container to allow move during // upload std::unordered_set tmp_container{}; -- cgit v1.2.3