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

Dynamic THD::proc_info

    XMLWordPrintable

Details

    Description

      The current design limits SHOW/information_schema.PROCESSLIST STATEs (or technically, THD::proc_info) to static const strings.

      Its description (in sql_class.h) reads:

      This member is accessed and assigned without any synchronization.
      Therefore, it may point only to constant (statically allocated) strings, which memory won't go away over time.

      However, memory for dynamic strings inherently will go away over time.
      Even an THD instance goes away as the corresponding thread terminates.

      Lifting this limitation enables threads to provide flexible statuses with specific details (such as table names, GTIDs and statistics, as requested by MDEV-4557) without the constraints of available PROCESSLIST columns.

      Requirements

      • Maintain performance with constant strings, as many existing statuses will likely remain
      • Be performant yet memory-safe for non-constant strings
        • E.g., lazy generation: format on read rather than on write
        • To be Confirmed: atomic copy-on-read
      • Optional: support “undo” (it’s a popular pattern) or even state nesting

      Attachments

        Issue Links

          Activity

            People

              ParadoxV5 Jimmy Hú
              ParadoxV5 Jimmy Hú
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.