MXS-2109: Change semantics of query_classifier_cache_size

The cache size now refers to the total memory used by the cache instead of
the per thread limit. This makes it easier to use as well as more
predictable by removing the dependency on the number of worker threads.
This commit is contained in:
Markus Mäkelä
2018-10-29 12:01:30 +02:00
parent 06d1189e94
commit 8d1b26060a
3 changed files with 21 additions and 25 deletions

View File

@ -174,7 +174,7 @@ public:
mxb_assert(peek(canonical_stmt) == nullptr);
mxb_assert(this_unit.classifier);
int64_t cache_max_size = this_unit.cache_max_size();
int64_t cache_max_size = this_unit.cache_max_size() / config_get_global_options()->n_threads;
int64_t size = canonical_stmt.size();
if (size <= cache_max_size)