From dd07d0db3fdd95d6997a0774508b6a01a915c09b Mon Sep 17 00:00:00 2001 From: yuval brave Date: Tue, 18 Jun 2019 16:50:49 +0300 Subject: [PATCH] Leastrecentlyused - ignore unexisting labels in labelLog after using eraselabel operation, label is removed from label list. but "leastrecentlyused" is iterating over the "labelLog" from there, the label still exist. after reading the erased label, osmosis try to check the size and throw execption. this will prevent osmosis from interacting with those labels. Issue:LBM1-8381 --- cpp/Osmosis/ObjectStore/LeastRecentlyUsed.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpp/Osmosis/ObjectStore/LeastRecentlyUsed.cpp b/cpp/Osmosis/ObjectStore/LeastRecentlyUsed.cpp index 9f0bd3b..aaca18d 100644 --- a/cpp/Osmosis/ObjectStore/LeastRecentlyUsed.cpp +++ b/cpp/Osmosis/ObjectStore/LeastRecentlyUsed.cpp @@ -100,6 +100,11 @@ void LeastRecentlyUsed::keepLabelsFromLabelLogUntilExceedingMaximumDiskUsage() _alreadyProcessedLabels.emplace( entry.label ); continue; } + if ( !_labels.exists( entry.label )) + { + _alreadyProcessedLabels.emplace( entry.label ); + continue; + } if ( _alreadyProcessedLabels.find( entry.label ) != _alreadyProcessedLabels.end() ) continue;