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

mariabackup options processing code refactoring

    XMLWordPrintable

Details

    Description

      There are the following requirements to mariabackup options processing:

      1) the priority of groups: backup, client/server. I.e. backup groups can override client and server options. Command line options can override any options from default groups;
      2) there can be the same options in server and client groups, which must be handled only for client/backup groups, and ignored for server groups;
      3) there can be server unknown options(for Galera sst script), which must be ignored, currently they are passed after --mysqld-args and override backup/server group options.
      BTW, this is a question, should mariabackup read backup group options if it is started for sst.
      4) process plugin options(encryption plugin is the only one used in mariabackup).

      Taking into account the above requirements I propose the following algorithm for options processing:

      1) Load backup groups in argv_server array
      2) Load server groups in argv_server array
      3) Handle server options set in argv_server array, ignore unknown. On this step argv_server array contains all options from backup/server groups and command line,
      which are not in server options set.
      4) Load backup groups in argv_client array
      5) Load client groups in argv_client array
      6) Handle client options set in argv_client array, ignore unknown. On this step argv_client array contains all options from backup/client groups and command line,
      which are not in client options set.
      7) Process plugin options, the result arguments array, let's call it argv_backup, will contain initial command line options without plugins options.
      Now we need to check if there are unknown options in backup groups and argv_backup.
      8) Truncate the list of command-line options before --mysqld_args, load backup groups
      9) Join server and client option sets, reset all pointers to variables in the result option set
      10) Handle options for joined and fixed options set, error out on unknown options

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vlad.lesin Vladislav Lesin
              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.