Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-4895

QC cache memory accounting on CentOS 7 is wrong

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 6.4.13
    • 6.4.14
    • QueryClassifier
    • None
    • RHEL/CentOS 7

    Description

      On RHEL/CentOS 7 systems the memory accounting done for the query classifier cache does not correctly shrink the SQL statement to fit into memory before storing it in the cache. The result of this is that the size calculation, which is correct on modern operating systems, is wrong and the actual amount of memory is much larger.

      This happens as the size of the string, not the capacity, is used to calculate the resulting memory usage. Since it's correct on all systems that do not implement the CoW std::string, the fix is to make sure that the CoW mechanism is not used.

      I've attached a test case that reproduces the problem. To use it, modify the connection information and compile it with:

      c++ -g -O2 standalone_random_queries.cc -lmariadb
      

      Attachments

        Activity

          People

            markus makela markus makela
            markus makela markus makela
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.