Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-253 Multi-source replication
  3. MDEV-551

Multi-source: Non-descriptive error message in the error log on creating a duplicate replication configuration

    XMLWordPrintable

    Details

    • Type: Technical task
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I have a replication connection 'master1' to master X. If I try to create another one, 'master2' to the same master, I get the error ER_MASTER_INFO (Could not initialize master info structure for 'master2'; more error messages can be found in the MariaDB error log), which is totally fine; but the error in the server log file, which it refers to, only says

      120926 16:30:52 [ERROR] Connection 'master1' already exists

      It is not really helpful – it doesn't even mention 'master2', which I had the problem with, so it will be pretty difficult to find in the error log and connect to the problem at hand. It would be nicer if it said something like "Connection 'master2' could not be created because it conflicts with the existing connection 'master1'", or alike. Even better if it also contained the parameters of both connections (master host/port)

      Test case (it's supposed to be used with my.cnf from multi-source; no need to add it to the suite though, it's just a fragment of a bigger test which I'll provide separately):

      cat suite/multi_source/duplicate_master.test

      --enable_connect_log
       
      --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
       
      # Start replication from the first master
       
      --replace_result $SERVER_MYPORT_1 MYPORT_1
      eval change master 'master1' to
      master_port=$SERVER_MYPORT_1,
      master_host='127.0.0.1',
      master_user='root';
       
      start slave 'master1';
      set default_master_connection = 'master1';
      --source include/wait_for_slave_to_start.inc
       
      # Try to configure a connection with the same master
      # using a different name
       
      --replace_result $SERVER_MYPORT_1 MYPORT_1
      --error ER_MASTER_INFO
      eval change master 'master2' to
      master_port=$SERVER_MYPORT_1,
      master_host='127.0.0.1',
      master_user='root';

        Attachments

          Activity

            People

            Assignee:
            monty Michael Widenius
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.