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

Service::status() recursively calculates status bits

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • 25.08.0
    • Core
    • None
    • MXS-SPRINT-227, MXS-SPRINT-228

    Description

      This has always been inefficient but now with MXS-5037 fixed, the Service::status() is used even for single-level services when used with readconnroute. This causes a thread-local variable to be accessed every time a query is routed which shows up in profiling.

      The solution to this would be to move the status bits into mxs::Target which would also allow inlining of the status checks. The status updates should then be done in a manner where the base class status is updated but the updating action is handled by the derived class. For servers, this is simply an assignment to the status variable but for services the status must be recursively calculated. Given that status changes are very rare but status checks are extremely frequent, this is worth optimizing for.

      Attachments

        Activity

          People

            markus makela markus makela
            markus makela markus makela
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.