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

More explanatory ERROR and WARNING messages when loading plugins with plugin-load-add that are already registered at mysql.plugin

    Details

    • Sprint:
      10.0.20, 10.0.21, 5.5.45

      Description

      In case a plugin is loaded with INSTALL SONAME , and the same plug is configured to be loaded at the configuration with plugin-load-add, there are not clear ERROR and WARNING mesages at the error log file.

      example:

      150302 14:00:14 [ERROR] Function 'TokuDB' already exists
      150302 14:00:14 [Warning] Couldn't load plugin named 'TokuDB' with soname 'ha_tokudb.so'.
      150302 14:00:14 [ERROR] Function 'TokuDB_trx' already exists
      150302 14:00:14 [Warning] Couldn't load plugin named 'TokuDB_trx' with soname 'ha_tokudb.so'.
      150302 14:00:14 [ERROR] Function 'TokuDB_lock_waits' already exists
      150302 14:00:14 [Warning] Couldn't load plugin named 'TokuDB_lock_waits' with soname 'ha_tokudb.so'.
      150302 14:00:14 [ERROR] Function 'TokuDB_locks' already exists
      150302 14:00:14 [Warning] Couldn't load plugin named 'TokuDB_locks' with soname 'ha_tokudb.so'.
      150302 14:00:14 [ERROR] Function 'TokuDB_file_map' already exists
      150302 14:00:14 [Warning] Couldn't load plugin named 'TokuDB_file_map' with soname 'ha_tokudb.so'.
      150302 14:00:14 [ERROR] Function 'TokuDB_fractal_tree_info' already exists
      150302 14:00:14 [Warning] Couldn't load plugin named 'TokuDB_fractal_tree_info' with soname 'ha_tokudb.so'.
      150302 14:00:14 [ERROR] Function 'TokuDB_fractal_tree_block_map' already exists
      150302 14:00:14 [Warning] Couldn't load plugin named 'TokuDB_fractal_tree_block_map' with soname 'ha_tokudb.so'.
      
      

      The messages should give the the reason for the errors
      Also, the Warnings are misleading, as in fact the TokuDB plugin is loaded properly
      example:

       
      150302 14:00:14 [Warning] Couldn't load plugin named 'TokuDB' with soname 'ha_tokudb.so'.
      
      mysql root@centos-6-5-tckt-8873:[Mon Mar  2 14:17:42 2015][(none)]> pager grep -i tokudb 
      PAGER set to 'grep -i tokudb'
      mysql root@centos-6-5-tckt-8873:[Mon Mar  2 14:17:47 2015][(none)]> show plugins ;
      | TokuDB                        | ACTIVE   | STORAGE ENGINE     | ha_tokudb.so | GPL     |
      | TokuDB_trx                    | ACTIVE   | INFORMATION SCHEMA | ha_tokudb.so | GPL     |
      | TokuDB_lock_waits             | ACTIVE   | INFORMATION SCHEMA | ha_tokudb.so | GPL     |
      | TokuDB_locks                  | ACTIVE   | INFORMATION SCHEMA | ha_tokudb.so | GPL     |
      | TokuDB_file_map               | ACTIVE   | INFORMATION SCHEMA | ha_tokudb.so | GPL     |
      | TokuDB_fractal_tree_info      | ACTIVE   | INFORMATION SCHEMA | ha_tokudb.so | GPL     |
      | TokuDB_fractal_tree_block_map | ACTIVE   | INFORMATION SCHEMA | ha_tokudb.so | GPL     |
      54 rows in set (0.00 sec)
      
      

      There should be a documentation change with explanation what will happen in this case at some MariaDB KnowledgeBase pages , so far I can list these ones:

      https://mariadb.com/kb/en/mariadb/install-plugin/
      https://mariadb.com/kb/en/mariadb/plugin-overview/
      https://mariadb.com/kb/en/mariadb/enabling-tokudb/

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              elenst Elena Stepanova added a comment -

              Hi Ivan,

              Could you please elaborate on this a bit, I don't quite understand the problem.

              The messages should give the the reason for the errors

              But they do give the reason, don't they? You've quoted it:

              150302 14:00:14 [ERROR] Function 'TokuDB' already exists
              

              This is the reason why it

              150302 14:00:14 [Warning] Couldn't load plugin named 'TokuDB' with soname 'ha_tokudb.so'.
              

              It looks quite readable to me; can you suggest a message which from your point of view would explain the problem better?

              Also, the Warnings are misleading, as in fact the TokuDB plugin is loaded properly

              No, actually it is not.
              Imagine that you have different libraries which contain the same plugins: ha_tokudb.so and my_toku.so.
              First you installed plugins from ha_tokudb.so via INSTALL SONAME. You'll see them in mysql.plugins.
              Then you restarted the server with plugin-load-add=my_toku.so. It loads the plugins from one library, but those from another one can't be installed, thus the error message.

              Show
              elenst Elena Stepanova added a comment - Hi Ivan, Could you please elaborate on this a bit, I don't quite understand the problem. The messages should give the the reason for the errors But they do give the reason, don't they? You've quoted it: 150302 14:00:14 [ERROR] Function 'TokuDB' already exists This is the reason why it 150302 14:00:14 [Warning] Couldn't load plugin named 'TokuDB' with soname 'ha_tokudb.so'. It looks quite readable to me; can you suggest a message which from your point of view would explain the problem better? Also, the Warnings are misleading, as in fact the TokuDB plugin is loaded properly No, actually it is not. Imagine that you have different libraries which contain the same plugins: ha_tokudb.so and my_toku.so. First you installed plugins from ha_tokudb.so via INSTALL SONAME. You'll see them in mysql.plugins. Then you restarted the server with plugin-load-add=my_toku.so. It loads the plugins from one library, but those from another one can't be installed, thus the error message.
              Hide
              ivan.stoykov@skysql.com Stoykov added a comment - - edited

              Hi Elena,

              I understand the messages are correct from the internal (low level) point of view , but the end user will understood that the plug-in is not loaded at all.

              I agree here that there might be different binaries. So adding short information that the plugin was already loaded from the particular *.so binary will help a lot.

              Something like :

              "[Warning] Couldn't load plugin named 'TokuDB' with soname 'ha_tokudb.so' as it was already loaded by the mysql.plugin configuration "
              "[Warning] Couldn't load plugin named 'TokuDB' with soname 'ha_tokudb.so' as it was already loaded by the plugin-load-add=my_toku.so"
              "[ERROR] Function 'TokuDB' already exists as the plugin named 'TokuDB' with soname 'ha_tokudb.so' as it was already loaded by the mysql.plugin configuration"
              "[ERROR] Function 'TokuDB' already exists as the plugin named 'TokuDB' with soname 'ha_tokudb.so' as it was already loaded  by the plugin-load-add=my_toku.so"
              

              In this way the end user will know the plugin is loaded and will not need to investigate further.

              Show
              ivan.stoykov@skysql.com Stoykov added a comment - - edited Hi Elena, I understand the messages are correct from the internal (low level) point of view , but the end user will understood that the plug-in is not loaded at all. I agree here that there might be different binaries. So adding short information that the plugin was already loaded from the particular *.so binary will help a lot. Something like : "[Warning] Couldn't load plugin named 'TokuDB' with soname 'ha_tokudb.so' as it was already loaded by the mysql.plugin configuration " "[Warning] Couldn't load plugin named 'TokuDB' with soname 'ha_tokudb.so' as it was already loaded by the plugin-load-add=my_toku.so" "[ERROR] Function 'TokuDB' already exists as the plugin named 'TokuDB' with soname 'ha_tokudb.so' as it was already loaded by the mysql.plugin configuration" "[ERROR] Function 'TokuDB' already exists as the plugin named 'TokuDB' with soname 'ha_tokudb.so' as it was already loaded by the plugin-load-add=my_toku.so" In this way the end user will know the plugin is loaded and will not need to investigate further.
              Hide
              zwendi raynzhuang added a comment -

              I would agree with Stoykov on the end user confusion issue. I try to investigate some other problem and come across the err log. I have been confused with such [error] message since my TokuDB plugin is working properly.

              Show
              zwendi raynzhuang added a comment - I would agree with Stoykov on the end user confusion issue. I try to investigate some other problem and come across the err log. I have been confused with such [error] message since my TokuDB plugin is working properly.
              Hide
              svoj Sergey Vojtovich added a comment -

              Though error message is not perfect indeed, I don't fully agree with proposed solution. I believe we should do the following:

              • issue just one error message, without this extra warning
              • don't abuse ER_UDF_EXISTS, instead add a proper error message for plugins
              • report either "starting plugin '<name>' initialization" or "plugin '<name>' initialized"
              • fix this in 10.1

              Sergei Golubchik, please review this bug and suggest what we should do about it.

              Show
              svoj Sergey Vojtovich added a comment - Though error message is not perfect indeed, I don't fully agree with proposed solution. I believe we should do the following: issue just one error message, without this extra warning don't abuse ER_UDF_EXISTS, instead add a proper error message for plugins report either "starting plugin '<name>' initialization" or "plugin '<name>' initialized" fix this in 10.1 Sergei Golubchik , please review this bug and suggest what we should do about it.
              Hide
              serg Sergei Golubchik added a comment -

              Sergey Vojtovich, I think

              • one error mesage is ok
              • proper error message is ok
              • ok, although perhaps only as a note as on verbose warning levels (log_warnings)
              • I think 10.0 is fine too
              Show
              serg Sergei Golubchik added a comment - Sergey Vojtovich , I think one error mesage is ok proper error message is ok ok, although perhaps only as a note as on verbose warning levels (log_warnings) I think 10.0 is fine too
              Hide
              svoj Sergey Vojtovich added a comment -

              Sergei Golubchik, I was afraid to break third party scripts that may rely on this error message text. Otherwise I don't mind fixing this in 10.0.

              Show
              svoj Sergey Vojtovich added a comment - Sergei Golubchik , I was afraid to break third party scripts that may rely on this error message text. Otherwise I don't mind fixing this in 10.0.
              Hide
              svoj Sergey Vojtovich added a comment -

              Sergei Golubchik, please review fix for this bug.

              Show
              svoj Sergey Vojtovich added a comment - Sergei Golubchik , please review fix for this bug.

                People

                • Assignee:
                  svoj Sergey Vojtovich
                  Reporter:
                  ivan.stoykov@skysql.com Stoykov
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Agile