summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstanly <[email protected]>2023-05-11 16:34:19 +0300
committerstanly <[email protected]>2023-05-11 16:34:19 +0300
commit35bb1cc919fd91eb1bd4981766811e7b09ecac47 (patch)
treea71e49a001aa5d2f3ef5f12451ae6e678a915598
parent796f894c3b303a63e67434f8f125f9b713fc7ee5 (diff)
use TStringBuilder
-rw-r--r--ydb/core/tx/columnshard/blob_manager.cpp4
-rw-r--r--ydb/core/tx/columnshard/columnshard_impl.cpp14
2 files changed, 9 insertions, 9 deletions
diff --git a/ydb/core/tx/columnshard/blob_manager.cpp b/ydb/core/tx/columnshard/blob_manager.cpp
index 5ed428342fa..b653f1b8e21 100644
--- a/ydb/core/tx/columnshard/blob_manager.cpp
+++ b/ydb/core/tx/columnshard/blob_manager.cpp
@@ -657,10 +657,10 @@ TEvictedBlob TBlobManager::GetDropped(const TUnifiedBlobId& blobId, TEvictMetada
}
void TBlobManager::GetCleanupBlobs(THashSet<TEvictedBlob>& cleanup) const {
- TString strBlobs;
+ TStringBuilder strBlobs;
for (auto& [evict, _] : DroppedEvictedBlobs) {
if (evict.State != EEvictState::EVICTING) {
- strBlobs += "'" + evict.Blob.ToStringNew() + "' ";
+ strBlobs << "'" << evict.Blob.ToStringNew() << "' ";
cleanup.insert(evict);
}
}
diff --git a/ydb/core/tx/columnshard/columnshard_impl.cpp b/ydb/core/tx/columnshard/columnshard_impl.cpp
index cbf3431927a..28239c7dbd8 100644
--- a/ydb/core/tx/columnshard/columnshard_impl.cpp
+++ b/ydb/core/tx/columnshard/columnshard_impl.cpp
@@ -943,9 +943,9 @@ void TColumnShard::ExportBlobs(const TActorContext& ctx, ui64 exportNo, const TS
TEvPrivate::TEvExport::TBlobDataMap&& blobsInfo) const {
Y_VERIFY(blobsInfo.size());
- TString strBlobs;
+ TStringBuilder strBlobs;
for (auto& [blobId, _] : blobsInfo) {
- strBlobs += "'" + blobId.ToStringNew() + "' ";
+ strBlobs << "'" << blobId.ToStringNew() << "' ";
}
LOG_S_NOTICE("Export blobs " << strBlobs << "at tablet " << TabletID());
@@ -967,14 +967,14 @@ void TColumnShard::ForgetTierBlobs(const TActorContext& ctx, const TString& tier
void TColumnShard::ForgetBlobs(const TActorContext& ctx, const THashSet<NOlap::TEvictedBlob>& evictedBlobs) {
THashMap<TString, std::vector<NOlap::TEvictedBlob>> tierBlobs;
- TString strBlobs;
- TString strBlobsDelayed;
+ TStringBuilder strBlobs;
+ TStringBuilder strBlobsDelayed;
for (const auto& ev : evictedBlobs) {
auto& blobId = ev.Blob;
if (BlobManager->BlobInUse(blobId)) {
LOG_S_DEBUG("Blob '" << blobId.ToStringNew() << "' in use at tablet " << TabletID());
- strBlobsDelayed += "'" + blobId.ToStringNew() + "' ";
+ strBlobsDelayed << "'" << blobId.ToStringNew() << "' ";
continue;
}
@@ -985,11 +985,11 @@ void TColumnShard::ForgetBlobs(const TActorContext& ctx, const THashSet<NOlap::T
LOG_S_ERROR("Forget unknown blob '" << blobId.ToStringNew() << "' at tablet " << TabletID());
} else if (NOlap::CouldBeExported(evict.State)) {
Y_VERIFY(evict.Blob == blobId);
- strBlobs += "'" + blobId.ToStringNew() + "' ";
+ strBlobs << "'" << blobId.ToStringNew() << "' ";
tierBlobs[meta.GetTierName()].emplace_back(std::move(evict));
} else {
Y_VERIFY(evict.Blob == blobId);
- strBlobsDelayed += "'" + blobId.ToStringNew() + "' ";
+ strBlobsDelayed << "'"<< blobId.ToStringNew() << "' ";
}
}