aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchertus <azuikov@ydb.tech>2023-04-05 16:46:37 +0300
committerchertus <azuikov@ydb.tech>2023-04-05 16:46:37 +0300
commit6bf6a28b8094f18d14d3bb80dfd2897375d2333e (patch)
treeb093c31e17b92db1f36329fc30b01a4576074bf2
parent91b2e25f78a8c61578837d8cfa75acd1b427c4e8 (diff)
downloadydb-6bf6a28b8094f18d14d3bb80dfd2897375d2333e.tar.gz
do not forget all blobs after read (only deleted)
-rw-r--r--ydb/core/tx/columnshard/blob_manager.cpp10
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*/) {