[MXS-4009] Use actual size when calculating memory usage of query classifier cache Created: 2022-02-17  Updated: 2022-03-07  Resolved: 2022-03-07

Status: Closed
Project: MariaDB MaxScale
Component/s: QueryClassifier
Affects Version/s: None
Fix Version/s: 2.5.20, 6.2.3

Type: Task Priority: Major
Reporter: Johan Wikman Assignee: Johan Wikman
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
causes MXS-4008 Query classifier cache does not prope... Closed

 Description   

Currently the exact size of a cached entry is not used when limiting the amount of memory used by the query classifier cache. This may lead to the cache using more memory than what it is supposed to use.

Further, when fields and functions are collected, separate strings are allocated for those. They should be stored as std::string_view:s pointing into the canonical statement. That would significantly reduce the amount of memory per query classifier cache entry.


Generated at Thu Feb 08 04:25:33 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.