PZ discovered that is Percona Server is installed and running without jemalloc prior to the installation of TokuDB (along with jemalloc dependency) then ps_tokudb_admin fails to load the plugin.
The solution that PZ recommend is the safest way to handle it. Have ps_tokudb_admin check to see if mysqld is running without jemalloc underneath. If that condition is true, then stop prior to installation of the plug-in with a message indicating a restart is required.
During restart, the updated mysqld_safe will detect and load the underlying jemalloc automatically and the ps_tokudb_admin --enable can proceed.
There is a command in the Jira issue that will check for jemalloc running underneath mysqld:
There is an issue in Jira BLD-246:
https:/ /jira.percona. com/browse/ BLD-246
PZ discovered that is Percona Server is installed and running without jemalloc prior to the installation of TokuDB (along with jemalloc dependency) then ps_tokudb_admin fails to load the plugin.
The solution that PZ recommend is the safest way to handle it. Have ps_tokudb_admin check to see if mysqld is running without jemalloc underneath. If that condition is true, then stop prior to installation of the plug-in with a message indicating a restart is required.
During restart, the updated mysqld_safe will detect and load the underlying jemalloc automatically and the ps_tokudb_admin --enable can proceed.
There is a command in the Jira issue that will check for jemalloc running underneath mysqld:
grep -c jemalloc /proc/$(cat {path}/ mysqld. pid)/environ
If this returns 0 then the process needs to stop with the restart notification.