mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
chore: tiered fixes (#3393)
1. Use introsive::list for CoolQueue. 2. Make sure that we ignore cool memory usage when computing average object size to prevent evictions during dashtable growth attempts. 3. Remove items from the cool storage before evicting them from the dash table. Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
2867d54a05
commit
0a26a06065
11 changed files with 131 additions and 194 deletions
|
@ -738,6 +738,9 @@ void EngineShard::CacheStats() {
|
|||
}
|
||||
}
|
||||
DCHECK_EQ(table_memory, db_slice.table_memory());
|
||||
if (tiered_storage_) {
|
||||
table_memory += tiered_storage_->CoolMemoryUsage();
|
||||
}
|
||||
size_t obj_memory = table_memory <= used_mem ? used_mem - table_memory : 0;
|
||||
|
||||
size_t bytes_per_obj = entries > 0 ? obj_memory / entries : 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue