sstables_manager: rename increment_total_reclaimable_memory_and_maybe_reclaim()
Renamed the aboved mentioned method to `increment_total_reclaimable_memory()` as it doesn't directly reclaim memory anymore. Signed-off-by: Lakshmi Narayanan Sreethar <lakshmi.sreethar@scylladb.com>
This commit is contained in:
@@ -1364,7 +1364,7 @@ future<> sstable::open_data(sstable_open_config cfg) noexcept {
|
||||
_stats.on_open_for_reading();
|
||||
|
||||
_total_reclaimable_memory.reset();
|
||||
_manager.increment_total_reclaimable_memory_and_maybe_reclaim(this);
|
||||
_manager.increment_total_reclaimable_memory(this);
|
||||
}
|
||||
|
||||
future<> sstable::update_info_for_opened_data(sstable_open_config cfg) {
|
||||
@@ -1608,7 +1608,7 @@ future<> sstable::load(sstables::foreign_sstable_open_info info) noexcept {
|
||||
validate_partitioner();
|
||||
co_await update_info_for_opened_data();
|
||||
_total_reclaimable_memory.reset();
|
||||
_manager.increment_total_reclaimable_memory_and_maybe_reclaim(this);
|
||||
_manager.increment_total_reclaimable_memory(this);
|
||||
}
|
||||
|
||||
future<foreign_sstable_open_info> sstable::get_open_info() & {
|
||||
|
||||
@@ -152,7 +152,7 @@ sstable_writer_config sstables_manager::configure_writer(sstring origin) const {
|
||||
return cfg;
|
||||
}
|
||||
|
||||
void sstables_manager::increment_total_reclaimable_memory_and_maybe_reclaim(sstable* sst) {
|
||||
void sstables_manager::increment_total_reclaimable_memory(sstable* sst) {
|
||||
_total_reclaimable_memory += sst->total_reclaimable_memory_size();
|
||||
_components_memory_change_event.signal();
|
||||
}
|
||||
|
||||
@@ -212,10 +212,8 @@ private:
|
||||
// Allow at most 10% of memory to be filled with such reads.
|
||||
size_t max_memory_sstable_metadata_concurrent_reads(size_t available_memory) { return available_memory * 0.1; }
|
||||
|
||||
// Increment the _total_reclaimable_memory with the new SSTable's reclaimable
|
||||
// memory and if the total memory usage exceeds the pre-defined threshold,
|
||||
// reclaim it from the SSTable that has the most reclaimable memory.
|
||||
void increment_total_reclaimable_memory_and_maybe_reclaim(sstable* sst);
|
||||
// Increment the _total_reclaimable_memory with the new SSTable's reclaimable memory
|
||||
void increment_total_reclaimable_memory(sstable* sst);
|
||||
// Fiber to reload reclaimed components back into memory when memory becomes available.
|
||||
future<> components_reclaim_reload_fiber();
|
||||
// Reclaims components from SSTables if total memory usage exceeds the threshold.
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
}
|
||||
|
||||
void increment_total_reclaimable_memory_and_maybe_reclaim(sstable *sst) {
|
||||
sstables_manager::increment_total_reclaimable_memory_and_maybe_reclaim(sst);
|
||||
sstables_manager::increment_total_reclaimable_memory(sst);
|
||||
}
|
||||
|
||||
size_t get_total_memory_reclaimed() {
|
||||
|
||||
Reference in New Issue
Block a user