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

Refactor threading in server startup (Windows)

    XMLWordPrintable

    Details

    • Sprint:
      10.1.31

      Description

      Specifically on Windows, server startup creates too many unnecessary threads. There is a thread that does nothing but waits for shutdown event, and possibly thread that handles socket connections, and possibly a thread that handles named pipe connections, and perhaps a thread that does shared memory connections. And there is a main thread that does nothing but waits for all other threads

      None of that is necessary, does not look good and is prone to races (shutdown thread vs main thread for example).

      It could be relatively easily rewritten to run in the main thread.
      IOCP/ GetQueuedCompletionStatus loop in the main thread could handle l sockets and named pipe connections directly .Also waiting for events can be rewritten that they do not block current thread, RegisterWaitForSingleObject does that, and can be passed handler routine which forwards event to the main thread's completion port via PostQueuedCompletionStatus

        Attachments

          Activity

            People

            Assignee:
            wlad Vladislav Vaintroub
            Reporter:
            wlad Vladislav Vaintroub
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: