diff options
author | chertus <azuikov@ydb.tech> | 2023-04-05 16:46:37 +0300 |
---|---|---|
committer | chertus <azuikov@ydb.tech> | 2023-04-05 16:46:37 +0300 |
commit | 6bf6a28b8094f18d14d3bb80dfd2897375d2333e (patch) | |
tree | b093c31e17b92db1f36329fc30b01a4576074bf2 | |
parent | 91b2e25f78a8c61578837d8cfa75acd1b427c4e8 (diff) | |
download | ydb-6bf6a28b8094f18d14d3bb80dfd2897375d2333e.tar.gz |
do not forget all blobs after read (only deleted)
-rw-r--r-- | ydb/core/tx/columnshard/blob_manager.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/ydb/core/tx/columnshard/blob_manager.cpp b/ydb/core/tx/columnshard/blob_manager.cpp index 615114e43e5..4e863e3b5bb 100644 --- a/ydb/core/tx/columnshard/blob_manager.cpp +++ b/ydb/core/tx/columnshard/blob_manager.cpp @@ -692,23 +692,19 @@ void TBlobManager::SetBlobInUse(const TUnifiedBlobId& blobId, bool inUse) { // Check if the blob is marked for delayed deletion if (blobId.IsSmallBlob()) { - if (SmallBlobsToDeleteDelayed.count(blobId)) { + if (SmallBlobsToDeleteDelayed.erase(blobId)) { LOG_S_DEBUG("BlobManager at tablet " << TabletInfo->TabletID << " Delayed Small Blob " << blobId << " is no longer in use" ); - SmallBlobsToDeleteDelayed.erase(blobId); SmallBlobsToDelete.insert(blobId); } } else { TLogoBlobID logoBlobId = blobId.GetLogoBlobId(); - auto delayedIt = BlobsToDeleteDelayed.find(logoBlobId); - if (delayedIt != BlobsToDeleteDelayed.end()) { + if (BlobsToDeleteDelayed.erase(logoBlobId)) { LOG_S_DEBUG("BlobManager at tablet " << TabletInfo->TabletID << " Delete Delayed Blob " << blobId); BlobsToDelete.insert(logoBlobId); - BlobsToDeleteDelayed.erase(delayedIt); + NBlobCache::ForgetBlob(blobId); } } - - NBlobCache::ForgetBlob(blobId); } bool TBlobManager::ExtractEvicted(TEvictedBlob& evict, TEvictMetadata& meta, bool fromDropped /*= false*/) { |