querier_cache: use the reader permit for memory accounting
The querier cache has a memory limit it enforces on cached queriers. For determining how much memory each querier uses, it currently uses `flat_mutation_reader::buffer_size()`. However, we now have a much more complete accounting of the memory each read consumes, in the form of the reader permit, which also happens to be handy in the queriers. So use it instead of the not very well maintained `buffer_size()`.
This commit is contained in:
@@ -170,7 +170,7 @@ public:
|
||||
}
|
||||
|
||||
size_t memory_usage() const {
|
||||
return _reader.buffer_size();
|
||||
return _permit.consumed_resources().memory;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user