Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-39492

Parallel Query: Study how to create worker threads

    XMLWordPrintable

Details

    • Q2/2026 Server Development

    Description

      What is the way to create another worker thread from the SQL layer?

      • Initially we should use a server variable that will control how many workers to create
      • We should request workers from the thread pool (right?)
        • And return them to the thread pool when they are done.

      Code a basic function that will

      • request N workers
      • Let these workers do something
      • Then return control to the main thread.
      • The main thread should wait for workers to finish (and start processing their result as soon as they are done).

      Followups to this task:

      • workers should be intialized to use MariaDB internal environment (mysys, etc)

      TODO - first things

      • Study the threadpool code to answer the above questions: (AI may also help with this)
        • How to get a worker thread
        • How to return a thread
      • How does one wait for multiple worker threads at the same time and handle them as soon as they terminate, provided they can do it in an arbitrary order?

      Attachments

        Activity

          People

            Johnston Rex Johnston
            psergei Sergei Petrunia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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