lsa: Fix compact_and_evict() being called with a too low step

compact_and_evict gets memory_to_release in bytes while
reclamation step is in segments.

Broken in f092decd90.

It doesn't make much difference with the current default step of 1
segment since we cannot reclaim less than that, so shouldn't cause
problems in practice.

Message-Id: <1556013920-29676-1-git-send-email-tgrabiec@scylladb.com>
This commit is contained in:
Tomasz Grabiec
2019-04-23 12:05:20 +02:00
committed by Avi Kivity
parent c6b3b9ff13
commit 21fbf59fa8

View File

@@ -677,7 +677,7 @@ segment* segment_pool::allocate_segment(size_t reserve)
_lsa_owned_segments_bitmap.set(idx);
return seg;
}
} while (shard_tracker().get_impl().compact_and_evict(reserve, shard_tracker().reclamation_step()));
} while (shard_tracker().get_impl().compact_and_evict(reserve, shard_tracker().reclamation_step() * segment::size));
return nullptr;
}