@@ -225,7 +225,7 @@ class TieredStorage::ShardOpManager : public tiering::OpManager {
225225 bool NotifyFetched (const OwnedEntryId& id, tiering::DiskSegment segment,
226226 tiering::Decoder* decoder) override ;
227227
228- bool NotifyDelete (tiering::DiskSegment segment, bool was_read ) override ;
228+ bool NotifyDelete (tiering::DiskSegment segment, bool in_memory ) override ;
229229
230230 void EnqueueForDefrag (tiering::DiskSegment segment);
231231
@@ -414,7 +414,7 @@ bool TieredStorage::ShardOpManager::NotifyFetched(const OwnedEntryId& id,
414414 return false ;
415415}
416416
417- bool TieredStorage::ShardOpManager::NotifyDelete (tiering::DiskSegment segment, bool was_read ) {
417+ bool TieredStorage::ShardOpManager::NotifyDelete (tiering::DiskSegment segment, bool in_memory ) {
418418 DVLOG (2 ) << " NotifyDelete [" << segment.offset << " ," << segment.length << " ]" ;
419419
420420 if (OccupiesWholePages (segment.length ))
@@ -428,8 +428,8 @@ bool TieredStorage::ShardOpManager::NotifyDelete(tiering::DiskSegment segment, b
428428 // If we have memory, upload the page for defrag. It will be reshuffled and offloaded more packed.
429429 // Otherwise background scans of fragmented bins will discover them
430430 if (bin.fragmented && ts_->UploadBudget () > 0 ) {
431- // Limit number of IO operations if we need to read from disk (was_read is false)
432- if (was_read || stats_.pending_defrags < kMaxPendingDefrags ) {
431+ // Limit number of IO operations if we need to read from disk (in_memory is false)
432+ if (in_memory || stats_.pending_defrags < kMaxPendingDefrags ) {
433433 EnqueueForDefrag (bin.segment );
434434 }
435435 }
@@ -668,7 +668,7 @@ void TieredStorage::RunOffloading(DbIndex dbid) {
668668
669669 const auto start_cycles = base::CycleClock::Now ();
670670
671- // Takes up a small fixed amount of time and is best done before offloading (to be picked up)
671+ // Takes up a small bounded amount of time and is best done before offloading (to be picked up)
672672 RunDefragScan ();
673673
674674 // Don't run offloading if there's only very little space left
0 commit comments