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:
Botond Dénes
2020-10-05 17:20:44 +03:00
parent f7eea06f61
commit cd8d10873f

View File

@@ -170,7 +170,7 @@ public:
}
size_t memory_usage() const {
return _reader.buffer_size();
return _permit.consumed_resources().memory;
}
};